services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: agent POSTGRES_USER: agent POSTGRES_PASSWORD: agent healthcheck: test: ["CMD-SHELL", "pg_isready -U agent -d agent"] interval: 5s timeout: 3s retries: 10 volumes: [postgres_data:/var/lib/postgresql/data] redis: image: redis:7-alpine api: build: context: . dockerfile: apps/api/Dockerfile env_file: .env environment: DATABASE_URL: postgresql+asyncpg://agent:agent@postgres:5432/agent REDIS_URL: redis://redis:6379/0 ports: ["8000:8000"] depends_on: postgres: {condition: service_healthy} web: build: context: . dockerfile: apps/web/Dockerfile environment: {NEXT_PUBLIC_API_URL: http://localhost:8000} ports: ["3000:80"] depends_on: [api] volumes: postgres_data: