services: agent-service: build: context: . dockerfile: Dockerfile container_name: activeblue-agent restart: unless-stopped env_file: .env depends_on: agent-db: condition: service_healthy networks: - activeblue-net healthcheck: test: ['CMD', 'curl', '-f', 'http://localhost:8001/health'] interval: 30s timeout: 10s retries: 3 start_period: 20s logging: driver: json-file options: max-size: '50m' max-file: '5' agent-db: image: postgres:15-alpine container_name: activeblue-agent-db restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB:-activeblue_ai} POSTGRES_USER: ${POSTGRES_USER:-activeblue} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - agent-db-data:/var/lib/postgresql/data networks: - activeblue-net healthcheck: test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-activeblue} -d ${POSTGRES_DB:-activeblue_ai}'] interval: 10s timeout: 5s retries: 5 logging: driver: json-file options: max-size: '20m' max-file: '3' volumes: agent-db-data: networks: activeblue-net: name: activeblue-net external: false