mirror of
https://github.com/aykhans/series-robot-web.git
synced 2025-04-21 06:13:34 +00:00
47 lines
992 B
YAML
47 lines
992 B
YAML
version: "3.9"
|
|
|
|
services:
|
|
db:
|
|
image: postgres
|
|
volumes:
|
|
- dbdata:/var/lib/postgresql/data
|
|
env_file:
|
|
- ../../config/db/databasepostgresql_env
|
|
|
|
rabbitmq:
|
|
image: rabbitmq
|
|
|
|
django:
|
|
restart: always
|
|
environment:
|
|
- DJANGO_SETTINGS_MODULE=config.settings.production
|
|
build:
|
|
context: ../../
|
|
dockerfile: Docker/Prod/Dockerfile
|
|
command: >
|
|
bash -c "python3 src/manage.py makemigrations
|
|
&& python3 src/manage.py migrate
|
|
&& python3 src/manage.py collectstatic --noinput
|
|
&& gunicorn --chdir src --bind 0.0.0.0:8000 config.wsgi"
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
- db
|
|
- rabbitmq
|
|
volumes:
|
|
- static_volume:/django_static
|
|
|
|
nginx:
|
|
image: nginx
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ../../config/nginx/server-cloudflare.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- static_volume:/django_static
|
|
depends_on:
|
|
- django
|
|
|
|
volumes:
|
|
dbdata:
|
|
static_volume:
|