services: agent-service: build: context: . dockerfile: Dockerfile container_name: activeblue-agent restart: unless-stopped env_file: .env ports: - '0.0.0.0:8001:8001' depends_on: agent-db: condition: service_healthy networks: - activeblue-net healthcheck: test: ['CMD', 'python3', '-c', "import urllib.request; urllib.request.urlopen('http://localhost:8001/health', timeout=5)"] 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