-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (81 loc) · 2.46 KB
/
Copy pathdocker-compose.yml
File metadata and controls
86 lines (81 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: schemapilot
POSTGRES_USER: schemapilot
POSTGRES_PASSWORD: dev
# 5432 not exposed on host to avoid conflicts with local postgres; use a `psql` exec if needed
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "55433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U schemapilot -d schemapilot"]
interval: 3s
timeout: 3s
retries: 20
simulator:
build: ./simulator
ports:
- "8001:8001"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8001/payload')"]
interval: 10s
timeout: 3s
retries: 5
backend:
build: ./backend
environment:
DATABASE_URL: postgresql+asyncpg://schemapilot:dev@postgres:5432/schemapilot
DATABASE_URL_SYNC: postgresql://schemapilot:dev@postgres:5432/schemapilot
ADMIN_SECRET: ${ADMIN_SECRET:-dev-secret}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
LLM_MODEL: ${LLM_MODEL:-claude-haiku-4-5-20251001}
FRONTEND_ORIGINS: ${FRONTEND_ORIGINS:-http://localhost:5174}
REGISTRY_PATH: /app/config/apis.yaml
FETCH_TIMEOUT_SEC: 10
RAW_BODY_MAX_BYTES: 262144
RAW_RETENTION_PER_ENDPOINT: 10
volumes:
- ./config:/app/config:ro
ports:
- "8080:8000"
depends_on:
postgres:
condition: service_healthy
simulator:
condition: service_started
frontend:
build:
context: ./frontend
args:
VITE_API_BASE_URL: http://localhost:8080
VITE_ADMIN_SECRET: ${ADMIN_SECRET:-dev-secret}
ports:
- "5174:5173"
depends_on:
- backend
runtime-guard:
build:
context: .
dockerfile: Dockerfile.runtime
environment:
DATABASE_URL: postgresql+asyncpg://schemapilot:dev@postgres:5432/schemapilot_runtime
DATABASE_URL_SYNC: postgresql://schemapilot:dev@postgres:5432/schemapilot_runtime
DB_POOL_SIZE: ${DB_POOL_SIZE:-25}
DB_MAX_OVERFLOW: ${DB_MAX_OVERFLOW:-15}
DB_POOL_TIMEOUT: ${DB_POOL_TIMEOUT:-30}
UVICORN_WORKERS: ${UVICORN_WORKERS:-1}
ports:
- "8018:8018"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8018/api/v1/metrics')"]
interval: 10s
timeout: 3s
retries: 10
volumes:
pgdata: