- Gate validation: all 143 unit tests pass (80.38% coverage), 11 integration tests pass - Fix ANTHROPIC_MODEL default: claude-sonnet-4-6-20260217 → claude-sonnet-4-6 - Fix docker-compose DATABASE_URL/REDIS_URL: remove nested var expansion - health_check.sh: auto-source .env for local runs, capture claude inference log - .github/workflows/ci.yml: lint (ruff), type-check (mypy), unit + integration tests - .github/workflows/build-and-notify.yml: build Python image → GHCR, notify sync-service - scripts/ops/apply-sync-autopr.sh: configure sync-service auto-PR to agent-deploy - scripts/ops/check-sync-autopr.sh: verify sync-service + ArgoCD app status Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
178 lines
4.4 KiB
YAML
178 lines
4.4 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: agent_platform
|
|
POSTGRES_USER: agent
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-CHANGE_ME}
|
|
ports:
|
|
- "15432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U agent -d agent_platform"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
|
|
ports:
|
|
- "16379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
etcd:
|
|
image: quay.io/coreos/etcd:v3.5.5
|
|
command: >-
|
|
etcd -advertise-client-urls=http://127.0.0.1:2379
|
|
-listen-client-urls=http://0.0.0.0:2379
|
|
--data-dir /etcd
|
|
ports:
|
|
- "2379:2379"
|
|
volumes:
|
|
- etcd_data:/etcd
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "etcdctl endpoint health --endpoints=http://127.0.0.1:2379"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
minio:
|
|
image: minio/minio:RELEASE.2024-01-13T07-53-03Z
|
|
command: server /data --console-address :9001
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
volumes:
|
|
- minio_data:/data
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"mc ready local >/dev/null 2>&1 || curl -fsS http://localhost:9000/minio/health/live >/dev/null",
|
|
]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
milvus:
|
|
image: milvusdb/milvus:v2.4.15
|
|
command: ["milvus", "run", "standalone"]
|
|
environment:
|
|
ETCD_ENDPOINTS: etcd:2379
|
|
MINIO_ADDRESS: minio:9000
|
|
MILVUS_LOG_LEVEL: info
|
|
depends_on:
|
|
etcd:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
ports:
|
|
- "19531:19530"
|
|
- "19091:9091"
|
|
volumes:
|
|
- milvus_data:/var/lib/milvus
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:9091/healthz"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 30
|
|
|
|
otel-collector:
|
|
image: otel/opentelemetry-collector-contrib:0.110.0
|
|
command: ["--config=/etc/otel/config.yaml"]
|
|
volumes:
|
|
- ./docker/otel-collector-config.yml:/etc/otel/config.yaml:ro
|
|
ports:
|
|
- "4317:4317"
|
|
- "4318:4318"
|
|
- "13133:13133"
|
|
- "8889:8889"
|
|
healthcheck:
|
|
test: ["CMD", "/otelcol-contrib", "--version"]
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 2
|
|
start_period: 1s
|
|
|
|
prometheus:
|
|
image: prom/prometheus:v2.54.0
|
|
command: ["--config.file=/etc/prometheus/prometheus.yml"]
|
|
volumes:
|
|
- ./docker/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- prometheus_data:/prometheus
|
|
ports:
|
|
- "19090:9090"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O - http://localhost:9090/-/ready >/dev/null"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
grafana:
|
|
image: grafana/grafana:11.2.0
|
|
environment:
|
|
GF_AUTH_ANONYMOUS_ENABLED: "true"
|
|
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
|
|
volumes:
|
|
- ./core/observability/dashboards/:/var/lib/grafana/dashboards/
|
|
- grafana_data:/var/lib/grafana
|
|
ports:
|
|
- "13000:3000"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O - http://localhost:3000/api/health >/dev/null"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.api
|
|
target: builder
|
|
command: uv run --frozen uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
DATABASE_URL: "postgresql+asyncpg://agent:${POSTGRES_PASSWORD:-CHANGE_ME}@postgres:5432/agent_platform"
|
|
REDIS_URL: "redis://redis:6379/0"
|
|
MILVUS_HOST: milvus
|
|
MILVUS_PORT: 19530
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
milvus:
|
|
condition: service_healthy
|
|
volumes:
|
|
- .:/app
|
|
- /app/.venv
|
|
ports:
|
|
- "18000:8000"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:8000/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
etcd_data:
|
|
minio_data:
|
|
milvus_data:
|
|
prometheus_data:
|
|
grafana_data:
|