- First add in /.envs, /.envs/.django and .envs/.postgres there format is shown here envs
- run
make buildinside root directory. - Then run
make upto start up the project for first time. - Use/update environment variables from [
.envs] Checkout the commands section for more usage.
.django
DB_HOST=db
DB_PORT=5432
DB_PASSWORD=password
DB_USER=user
DB_NAME=django_db
.postgres
POSTGRES_HOST=db
POSTGRES_PORT=5432
POSTGRES_USER=user
POSTGRES_PASSWORD=password
POSTGRES_DB=django_db
To use this project, run this commands:
make upto build the project and starting containers.make buildto build the project.make startto start containers if project has been up already.make stopto stop containers.make shell-webto shell access web container.make shell-dbto shell access db container.make shell-nginxto shell access nginx container.make logs-webto log access web container.make logs-dbto log access db container.make logs-nginxto log access nginx container.make collectstaticto put static files in static directory.make log-webto log access web container.make log-dbto log access db container.make log-nginxto log access nginx container.make restartto restart containers.make pruneto delete all stopped containers and cached datamake psto list all active containersmake deployto list django's deployment checklist more at https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/