services: db: image: pgvector/pgvector:pg16 environment: POSTGRES_USER: insights POSTGRES_PASSWORD: insights POSTGRES_DB: insights ports: ["5432:5432"] volumes: [pgdata:/var/lib/postgresql/data] healthcheck: test: ["CMD-SHELL", "pg_isready -U insights"] interval: 5s retries: 10 redis: image: redis:7 ports: ["6379:6379"] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s retries: 10 api: build: . command: sh -c "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload" env_file: .env environment: DATABASE_URL: postgresql+asyncpg://insights:insights@db:5432/insights REDIS_URL: redis://redis:6379/0 ports: ["8000:8000"] volumes: [.:/code] depends_on: db: {condition: service_healthy} redis: {condition: service_healthy} worker: build: . command: arq app.worker.settings.WorkerSettings env_file: .env environment: DATABASE_URL: postgresql+asyncpg://insights:insights@db:5432/insights REDIS_URL: redis://redis:6379/0 volumes: [.:/code] depends_on: db: {condition: service_healthy} redis: {condition: service_healthy} volumes: pgdata: