78 lines
1.5 KiB
YAML
78 lines
1.5 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: infrasynth
|
|
POSTGRES_USER: infrasynth
|
|
POSTGRES_PASSWORD: infrasynth
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U infrasynth"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
web:
|
|
build: .
|
|
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 4 --timeout 120
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ".:/app"
|
|
|
|
worker:
|
|
build: .
|
|
command: celery -A config worker -l info -Q default,webhooks,notifications,billing
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ".:/app"
|
|
|
|
beat:
|
|
build: .
|
|
command: celery -A config beat -l info
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ".:/app"
|
|
|
|
flower:
|
|
image: mher/flower
|
|
ports:
|
|
- "5555:5555"
|
|
environment:
|
|
CELERY_BROKER_URL: redis://redis:6379/0
|
|
depends_on: [redis]
|
|
|
|
volumes:
|
|
pgdata:
|