comfy/artel/docker-compose-prod.yml

102 wiersze
1.9 KiB
YAML

2023-05-03 18:21:28 +00:00
version: "3.8"
services:
2023-05-25 22:47:35 +00:00
db:
image: postgres
restart: always
environment:
- POSTGRES_ROOT_PASSWORD
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
volumes:
- ../postgres/:/var/lib/postgresql
env_file:
- .env
2023-05-25 22:58:40 +00:00
networks:
- nginx_network
2023-05-25 22:47:35 +00:00
2023-09-24 15:38:02 +00:00
rabbit:
hostname: rabbit
image: rabbitmq:3.6.0
environment:
- RABBITMQ_DEFAULT_USER
- RABBITMQ_DEFAULT_PASS
ports:
- "5672:5672" # We forward this port because it's useful for debugging
- "15672:15672" # Here, we can access RabbitMQ management plugin
2023-05-03 18:21:28 +00:00
comfy:
build:
dockerfile: Dockerfile
context: ./
2023-06-19 18:51:25 +00:00
user: "${UID}:${GID}"
2023-05-18 15:23:54 +00:00
restart: always
2023-05-03 18:21:28 +00:00
ports:
2023-09-24 15:21:00 +00:00
- "8001:8000"
2023-05-03 18:21:28 +00:00
volumes:
- ./:/app
2023-05-16 18:03:55 +00:00
environment:
- SECRET_KEY
- DATABASE_URL
- DJANGO_SETTINGS_MODULE
env_file:
- .env
2023-05-25 22:47:35 +00:00
depends_on:
2023-05-25 22:58:40 +00:00
- db
networks:
- nginx_network
2023-05-25 22:47:35 +00:00
web:
image: nginx
2023-06-19 18:51:25 +00:00
restart: always
2023-05-03 18:21:28 +00:00
volumes:
2023-05-25 22:58:40 +00:00
- ../nginx/conf.d/:/etc/nginx/conf.d/
- ./static/:/opt/services/comfy/static
- ./media/:/opt/services/comfy/media
2023-05-25 22:47:35 +00:00
ports:
2023-05-25 22:58:40 +00:00
- "8000:80"
2023-05-25 22:47:35 +00:00
environment:
2023-05-25 22:58:40 +00:00
- NGINX_HOST=artel.tepewu.pl
- NGINX_PORT=80
networks:
- nginx_network
2023-09-24 15:38:02 +00:00
beat:
build:
context: .
dockerfile: Dockerfile
command: celery -A artel beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
volumes:
- ./:/app
env_file:
- .env
environment:
- SECRET_KEY
- DATABASE_URL
depends_on:
- comfy
- rabbit
worker:
build:
context: .
dockerfile: Dockerfile
command: celery -A artel worker -l info
volumes:
- ./:/app
- ./media:/app/media
env_file:
- .env
environment:
- SECRET_KEY
- DATABASE_URL
depends_on:
- comfy
- rabbit
- beat
2023-05-25 22:58:40 +00:00
networks:
nginx_network:
driver: bridge