services: db: image: postgres:16-alpine environment: POSTGRES_DB: campaignforge POSTGRES_USER: campaignforge POSTGRES_PASSWORD: campaignforge volumes: - pgdata:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U campaignforge"] 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: python manage.py runserver 0.0.0.0:8000 volumes: - .:/app ports: - "8000:8000" env_file: .env depends_on: db: condition: service_healthy redis: condition: service_healthy worker: build: . command: celery -A campaignforge worker -l info -Q sends,dispatch,celery -c 4 volumes: - .:/app env_file: .env depends_on: db: condition: service_healthy redis: condition: service_healthy volumes: pgdata: