A boilerplate built with Django, Postgres, Nginx, etc.
Before anything, you should make your own environment variables. To do that firstly, run the command line below on your terminal:
cat .env.EXAMPLE > .envnow its build a .env file fill the gaps based on your project.
We use black for our code-style!
It's already written in requirements you just need to run commandline below.
black .To run the project for development purpose run the commandline below:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml upYou also can make a alias for this command.
To run the project with docker swarm, you need to initialize docker swarm and add some secrets, then deploy the project.
docker swarm initecho "YOUR_SECRET" | docker secret create secret-name -The secrets you need to add is listed here.
| Secret name | Description |
|---|---|
| db-name | Name of the database |
| db-user | user of the database |
| db-pass | password of the database |
| access-key | storage's access key |
| secret-key | storage's secret key |
| nginx.crt | The Nginx's certificate |
| nginx.key | The Nginx's private key |
| dhparam.pem |
Run the command line below to make nginx ssl
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx.key -out nginx.crt sudo openssl dhparam -out dhparam.pem 2048
docker stack deploy --orchestrator swarm -c docker-compose.yml -c docker-compose.swarm.yml <project_name>docker service lsSee CONTRIBUTING.
Thanks to all the people who already contributed!