Django Boilerplate
Made with Docker, Nginx, Gunicorn and PostgreSQL
For myself and anyone like me who always screws up something when setting up a new Django project.
☝️ This is what you’ll see once everything is working ?
Features
- Use for development and production environments.
- Local PostgreSQL database for development or connect to a remote test database.
- Runs with Gunicorn as its WSGI application server
- Nginx configured for serving the Django server and static files.
- Ready to play immediately – Templates are enabled.
Manual
For development environment follow these steps:
- Make sure you have docker-compose installed.
- In the root directory (the one with docker-compose), run
docker-compose build
- Followed by
docker-compose up
- To stop the services press ctrl + c or
docker-compose stop
in another terminal.
For production environment follow these:
- Make sure you have docker-compose installed.
- Fill in the .prod.env file with information regarding your database.
- In the root directory (the one with docker-compose), run
docker-compose -f docker-compose.prod.yml build
- Followed by
docker-compose -f docker-compose.prod.yml up
- To stop the services press ctrl + c or
docker-compose stop
in another terminal.