pahvalentines/backend/docker-compose.yml
michael d4376d092b docker: make storage host path configurable
Add STORAGE_HOST_PATH env var for volume mount.
Defaults to ../storage for local dev.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:54:54 -06:00

84 lines
2.3 KiB
YAML

version: '3.8'
services:
web:
build: .
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://pah:pah_password@db:5432/pah
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- SONAUTO_API_KEY=${SONAUTO_API_KEY}
- SONAUTO_API_URL=https://api.sonauto.ai/v1
- WEBHOOK_BASE_URL=${WEBHOOK_BASE_URL}
- STORAGE_BASE=/app/storage
volumes:
- ${STORAGE_HOST_PATH:-../storage}:/app/storage
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
celery_worker:
build: .
command: celery -A tasks.celery_app worker --loglevel=info --concurrency=4
environment:
- DATABASE_URL=postgresql://pah:pah_password@db:5432/pah
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- SONAUTO_API_KEY=${SONAUTO_API_KEY}
- SONAUTO_API_URL=https://api.sonauto.ai/v1
- WEBHOOK_BASE_URL=${WEBHOOK_BASE_URL}
- STORAGE_BASE=/app/storage
volumes:
- ${STORAGE_HOST_PATH:-../storage}:/app/storage
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
celery_beat:
build: .
command: celery -A tasks.celery_app beat --loglevel=info
environment:
- DATABASE_URL=postgresql://pah:pah_password@db:5432/pah
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- SONAUTO_API_KEY=${SONAUTO_API_KEY}
- SONAUTO_API_URL=https://api.sonauto.ai/v1
- WEBHOOK_BASE_URL=${WEBHOOK_BASE_URL}
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
db:
image: postgres:15
environment:
- POSTGRES_USER=pah
- POSTGRES_PASSWORD=pah_password
- POSTGRES_DB=pah
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pah -d pah"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
postgres_data: