mirror of
https://github.com/Significant-Gravitas/AgentProbe.git
synced 2026-11-10 04:41:46 -10:00
Add an `agentprobe` Docker Compose healthcheck so Compose can distinguish process start from server readiness. The probe calls `/readyz` from inside the container, and the server playbook documents the command plus failure debugging steps. Validation: - docker compose config - docker compose up --build -d agentprobe; waited for healthy; curl /readyz; docker compose down -v - bun run docs:validate - bun test tests/integration/server/read-only.test.ts tests/unit/server/auth.test.ts tests/unit/server/config.test.ts - git diff --check - bun run fast-feedback
58 lines
2.1 KiB
YAML
58 lines
2.1 KiB
YAML
services:
|
|
agentprobe:
|
|
build: .
|
|
ports:
|
|
- "127.0.0.1:7878:7878"
|
|
environment:
|
|
AGENTPROBE_SERVER_TOKEN: ${AGENTPROBE_SERVER_TOKEN:?set AGENTPROBE_SERVER_TOKEN}
|
|
AGENTPROBE_SERVER_CORS_ORIGINS: ${AGENTPROBE_SERVER_CORS_ORIGINS:?set AGENTPROBE_SERVER_CORS_ORIGINS}
|
|
OPEN_ROUTER_API_KEY: ${OPEN_ROUTER_API_KEY:?set OPEN_ROUTER_API_KEY}
|
|
AGENTPROBE_SERVER_DATA: /app/data
|
|
# Default backend is SQLite persisted on the named volume below.
|
|
# To switch to Postgres, uncomment the postgres service and AGENTPROBE_DB_URL
|
|
# line below, then run `bun src/cli/main.ts db:migrate` before starting
|
|
# this service. The server refuses to boot against an out-of-date Postgres schema.
|
|
AGENTPROBE_SERVER_DB: /app/.agentprobe/runs.sqlite3
|
|
# AGENTPROBE_DB_URL: postgres://agentprobe:agentprobe@postgres:5432/agentprobe
|
|
AGENTPROBE_SERVER_DASHBOARD_DIST: /app/dashboard/dist
|
|
AGENTPROBE_SERVER_LOG_FORMAT: json
|
|
volumes:
|
|
- ./data:/app/data:ro
|
|
- agentprobe-sqlite:/app/.agentprobe
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"bun",
|
|
"-e",
|
|
"fetch('http://127.0.0.1:7878/readyz').then((r) => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))",
|
|
]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
# depends_on:
|
|
# postgres:
|
|
# condition: service_healthy
|
|
|
|
# Optional Postgres backend. The default stack ships SQLite on a volume;
|
|
# operators who want durable history across container recreations can enable
|
|
# this service. Remember to run `agentprobe db:migrate` before `start-server`.
|
|
# postgres:
|
|
# image: postgres:16-alpine
|
|
# environment:
|
|
# POSTGRES_USER: agentprobe
|
|
# POSTGRES_PASSWORD: agentprobe
|
|
# POSTGRES_DB: agentprobe
|
|
# volumes:
|
|
# - agentprobe-postgres:/var/lib/postgresql/data
|
|
# healthcheck:
|
|
# test: ["CMD-SHELL", "pg_isready -U agentprobe -d agentprobe"]
|
|
# interval: 5s
|
|
# timeout: 3s
|
|
# retries: 10
|
|
|
|
volumes:
|
|
agentprobe-sqlite:
|
|
# agentprobe-postgres:
|