added gunicorn

This commit is contained in:
ayxan
2022-10-01 23:10:30 +04:00
parent e613fe1874
commit 46bbb10d20
6 changed files with 40 additions and 15 deletions

View File

@@ -5,16 +5,28 @@ services:
image: postgres
volumes:
- dbdata:/var/lib/postgresql/data
- static_volume:/src/django_static
env_file:
- config/db/databasepostgresql_env
django:
build: .
command: python3 src/manage.py runserver 0.0.0.0:8000 --settings=config.settings.production
command: gunicorn src.config.wsgi:application --bind 0.0.0.0:8000
ports:
- "8000:8000"
depends_on:
- db
nginx:
image: nginx
ports:
- "1337:8080"
volumes:
- ./config/nginx/local.conf:/etc/nginx/conf.d/default.conf:ro
- static_volume:/src/django_static
depends_on:
- django
volumes:
dbdata:
dbdata:
static_volume: