services: # Shared dependency image (docker/base.Dockerfile). Built once and reused by the # four services below through `additional_contexts`; it never runs on its own. base: build: context: . dockerfile: docker/base.Dockerfile image: sre-agent-base:local scale: 0 firestore-emulator: image: google/cloud-sdk:emulators container_name: firestore-emulator command: gcloud beta emulators firestore start --host-port=0.0.0.0:8080 ports: - "8084:8080" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080"] interval: 5s timeout: 5s retries: 5 inventory-agent: build: context: . dockerfile: inventory_agent/Dockerfile additional_contexts: base: service:base container_name: inventory-agent ports: - "8083:8080" environment: - FIRESTORE_EMULATOR_HOST=firestore-emulator:8080 # Advertised in the A2A agent card at /.well-known/agent-card.json. - A2A_PUBLIC_URL=http://inventory-agent:8080 - GCP_PROJECT=${GCP_PROJECT:-local-dev} - MOCK_GCP=true depends_on: firestore-emulator: condition: service_healthy sre-agent: build: context: . dockerfile: sre_agent/Dockerfile additional_contexts: base: service:base container_name: sre-agent ports: - "8082:8080" environment: - FIRESTORE_EMULATOR_HOST=firestore-emulator:8080 - INVENTORY_AGENT_URL=http://inventory-agent:8080 # Advertised in the A2A agent card at /.well-known/agent-card.json. - A2A_PUBLIC_URL=http://sre-agent:8080 - GCP_PROJECT=${GCP_PROJECT:-local-dev} # Optional: with a key the sub-agent runs the real ADK + Gemini tier. - GEMINI_API_KEY=${GEMINI_API_KEY:-} - MOCK_GCP=true volumes: - mock-telemetry:/workspace/mock_telemetry_data depends_on: firestore-emulator: condition: service_healthy inventory-agent: condition: service_started orchestrator-agent: build: context: . dockerfile: agent/Dockerfile additional_contexts: base: service:base container_name: orchestrator-agent ports: - "8080:8080" environment: - FIRESTORE_EMULATOR_HOST=firestore-emulator:8080 # Setting SRE_AGENT_URL makes diagnose_sre call the sub-agent over A2A # instead of running the workflow in-process. - SRE_AGENT_URL=http://sre-agent:8080 - GCP_PROJECT=${GCP_PROJECT:-local-dev} # Optional: without a key the Orchestrator runs its simulated agent. - GEMINI_API_KEY=${GEMINI_API_KEY:-} - MOCK_GCP=true depends_on: firestore-emulator: condition: service_healthy sre-agent: condition: service_started app: build: context: . dockerfile: app/Dockerfile additional_contexts: base: service:base container_name: target-app ports: - "8081:8080" environment: - GCP_PROJECT=${GCP_PROJECT:-local-dev} - MOCK_GCP=true volumes: - mock-telemetry:/workspace/mock_telemetry_data volumes: # In mock mode the target app writes its traces and logs here, and the SRE # sub-agent reads them, so both containers must share it. mock-telemetry: