This is a simple Django blog boilerplate project that uses Docker for easy setup and deployment. It features a basic blog interface, with posts created through the default Django admin interface. Ideal for quick deployment and development, this boilerplate provides a straightforward blogging platform that you can easily extend and customize.
Work in progress
TODO :
- Security
- Markdown support
- Comments
- Others pages
- SEO
- Basic blog setup using Django
- Default Django admin interface for creating and managing posts
- Dockerized environment for simple, consistent setup
- Easy deployment with Docker Compose
Make sure you have the following installed on your machine:
-
Clone the repository:
git clone https://github.com/kbrault/djangoBlog.git cd djangoblog -
Modify the .env file:
nano .env
By default, the superuser is set to root/root, you must modify it :
SECRET_KEYThis is used to provide cryptographic signing, and should be set to a unique, unpredictable value.SUPER_USER_NAMELogin of the superuserSUPER_USER_PASSWORDPassword of the superuserSUPER_USER_EMAILEmail of the superuser
-
Build the project:
docker compose up -d
It automaticaly :
- Runs
makemigrationto creates new migrations based on changes you've made to your Django models. - Runs
migrationto applies migrations to the database, executing SQL commands to update the database schema. - Runs
collectstaticgathers all static files (CSS, JavaScript, images) from your app and places them in a single directory, specified inSTATIC_ROOT.
- Runs
-
Access the application:
- The blog should be accessible at
http://0.0.0.0:8000. - The Django admin interface is available at
http://0.0.0.0:8000/admin.
- The blog should be accessible at
This boilerplate contains the following Docker services:
django_gunicorn: The main Django application server running on Gunicorn.nginx: NGINX serves as a reverse proxy for the application.
This boilerplate contains the following Docker services:
Bootstrap css: Bootstrap CSS is a front-end framework that simplifies web development by providing responsive design, pre-built components, and a customizable grid system.
Persistent data is stored in the following Docker volumes:
djangoblog_static:Stores static files.djangoblog_db: Stores database data.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to submit issues or pull requests. Contributions are welcome!
