-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathcompose.yml
More file actions
107 lines (102 loc) · 3.5 KB
/
Copy pathcompose.yml
File metadata and controls
107 lines (102 loc) · 3.5 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Per-worktree infra. `git:workinit` sets a unique COMPOSE_PROJECT_NAME and
# `zero:remap-ports` remaps the host ports, so each worktree gets its own
# Postgres, Redis, and ClickHouse without colliding.
# Services shared safely through explicit worktree namespaces live in
# compose.shared.yml and run once for the whole machine: Temporal, Pub/Sub,
# Presidio, and the LGTM observability stack.
name: ${COMPOSE_PROJECT_NAME:-gram}
services:
gram-db:
image: pgvector/pgvector:pg17
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "${DB_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
# Init scripts run only on FIRST container start (empty data volume).
# Currently used to create the gram_devidp database for the dev-idp
# binary; see local/postgres-init/01-create-gram-devidp.sql.
- ./local/postgres-init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
interval: 5s
timeout: 5s
retries: 5
gram-cache:
image: redis:6.2-alpine
restart: unless-stopped
volumes:
- cache_data:/var/lib/gram-cache/data
ports:
- "${GRAM_REDIS_CACHE_PORT}:35299"
command: redis-server --port 35299 --requirepass xi9XILbY
litellm:
profiles: [litellm]
image: ghcr.io/berriai/litellm:v1.94.0@sha256:65d84a2282137b4dc73bbe184650a7c807177c533e4223b3bfbc87963fe3fabe
restart: unless-stopped
command: ["--config", "/app/config.yaml", "--port", "4000"]
environment:
OPENROUTER_API_KEY: ${OPENROUTER_DEV_KEY}
volumes:
- ./local/litellm/config.yaml:/app/config.yaml:ro
ports:
- "${LITELLM_PORT}:4000"
healthcheck:
test:
[
"CMD-SHELL",
'python3 -c "import urllib.request; urllib.request.urlopen(''http://localhost:4000/health/liveliness'')"',
]
interval: 10s
timeout: 5s
retries: 12
clickhouse:
image: clickhouse/clickhouse-server:26.2.19.43@sha256:c2f2605585899d5103a0447daadbc0005f362200d5f0fcca7f40db3ca0dd36dd
restart: unless-stopped
ports:
- "${CLICKHOUSE_HTTP_PORT}:8123"
- "${CLICKHOUSE_NATIVE_PORT}:9440"
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: gram
CLICKHOUSE_PASSWORD: gram
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
volumes:
- clickhouse_data:/var/lib/clickhouse
- ./local/clickhouse/config.d/config.xml:/etc/clickhouse-server/config.d/config.xml:ro
- ./local/clickhouse/config.d/limits.xml:/etc/clickhouse-server/config.d/limits.xml:ro
- ./local/clickhouse/config.d/ssl.xml:/etc/clickhouse-server/config.d/ssl.xml:ro
- ./local/clickhouse/users.d/dev_profile.xml:/etc/clickhouse-server/users.d/dev_profile.xml:ro
- ./local/clickhouse/certs:/etc/clickhouse-server/certs:ro
ulimits:
nofile:
soft: 262144
hard: 262144
mcp-registry-db:
profiles: [local-registry]
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_USER: mcp_registry
POSTGRES_PASSWORD: mcp_registry
POSTGRES_DB: mcp_registry
volumes:
- mcp_registry_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mcp_registry"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data:
driver: local
cache_data:
driver: local
clickhouse_data:
driver: local
mcp_registry_data:
driver: local