-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathcompose.mcp.yml
More file actions
137 lines (132 loc) · 4.62 KB
/
compose.mcp.yml
File metadata and controls
137 lines (132 loc) · 4.62 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
services:
core:
# Uses `$SUPERTOKENS_CORE_VERSION` when available, else latest
image: supertokens/supertokens-dev-postgresql:${SUPERTOKENS_CORE_VERSION:-master}
entrypoint: [
"/usr/lib/supertokens/jre/bin/java",
"-classpath", "/usr/lib/supertokens/core/*:/usr/lib/supertokens/plugin-interface/*:/usr/lib/supertokens/ee/*",
"io.supertokens.Main", "/usr/lib/supertokens/", "DEV", "test_mode"
]
ports:
# Uses `$SUPERTOKENS_CORE_PORT` when available, else 3567 for local port
- ${SUPERTOKENS_CORE_PORT:-3567}:3567
platform: linux/amd64
depends_on:
oauth:
condition: service_started
pg:
condition: service_healthy
environment:
OAUTH_PROVIDER_PUBLIC_SERVICE_URL: http://oauth:4444
OAUTH_PROVIDER_ADMIN_SERVICE_URL: http://oauth:4445
OAUTH_PROVIDER_CONSENT_LOGIN_BASE_URL: http://localhost:3001/auth
OAUTH_CLIENT_SECRET_ENCRYPTION_KEY: asdfasdfasdfasdfasdf
INFO_LOG_PATH: "null"
ERROR_LOG_PATH: "null"
LOG_LEVEL: "DEBUG"
POSTGRESQL_HOST: "pg"
POSTGRESQL_PORT: "5432"
POSTGRESQL_USER: "root"
POSTGRESQL_PASSWORD: "root"
POSTGRESQL_DATABASE_NAME: "postgres"
# Passed through from host env or .env file (gitignored)
SUPERTOKENS_LICENSE_KEY: ${SUPERTOKENS_LICENSE_KEY:-}
healthcheck:
test: bash -c 'curl -s "http://127.0.0.1:3567/hello" | grep "Hello"'
interval: 10s
timeout: 5s
retries: 5
# ── PostgreSQL ───────────────────────────────────────────────────────
pg:
image: percona/percona-distribution-postgresql:13
restart: unless-stopped
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: postgres
#ports:
# Expose to host for convenience (e.g. psql / pgAdmin).
# The MCP container reaches it via pg:5432 on the Docker network.
# - "127.0.0.1:5499:5432"
# volumes:
# Persistent data — remove if you want a fresh DB every restart
# - pg_data:/var/lib/postgresql/data
# Drop .sql scripts here to auto-run on first start
# - ./dev-tools/initdb/postgres:/docker-entrypoint-initdb.d:ro
tmpfs:
- /var/lib/postgresql/data:size=4g
mem_limit: 4g
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root -d postgres"]
interval: 5s
timeout: 3s
retries: 10
# Tuned for test workloads — aggressive settings, not for production
command: >
postgres
-c max_connections=1000
-c fsync=off
-c synchronous_commit=off
-c full_page_writes=off
-c wal_level=minimal
-c max_wal_senders=0
-c max_wal_size=2GB
-c shared_buffers=512MB
-c work_mem=64MB
oauth:
image: oryd/hydra:v2.2.0
restart: unless-stopped
environment:
DSN: memory
# DSN: postgres://root:root@pg:5432/postgres?sslmode=disable
URLS_SELF_ISSUER: http://oauth:4444
URLS_LOGIN: http://localhost:3001/auth/oauth/login
URLS_CONSENT: http://localhost:3001/auth/oauth/consent
URLS_LOGOUT: http://localhost:3001/auth/oauth/logout
SECRETS_SYSTEM: thisIsATestSecretThatIsAtLeast32Chars
SECRETS_COOKIE: thisIsATestCookieSecretAtLeast32
SERVE_COOKIES_SAME_SITE_MODE: Lax
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4445/health/alive"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
mem_limit: 2g
depends_on:
pg:
condition: service_healthy
entrypoint: ["sh", "-c"]
command: ["hydra migrate sql -e --yes && hydra serve all --dev"]
mcp:
build:
context: .
dockerfile: Dockerfile.mcp
ports:
# Default MCP_PORT defined in mcp.env
- "127.0.0.1:${MCP_PORT:-3001}:3000"
environment:
MCP_TRANSPORT: sse
MCP_PORT: "3000"
PYTHON_MCP_WORKSPACE: /workspace
SUPERTOKENS_CORE_HOST: core
SUPERTOKENS_CORE_PORT: "3567"
SUPERTOKENS_ENV: testing
# Passed through from host env or .env file (gitignored)
SUPERTOKENS_LICENSE_KEY: ${SUPERTOKENS_LICENSE_KEY:-}
volumes:
- .:/workspace
- pip-cache:/root/.cache/pip
- pre-commit-cache:/root/.cache/pre-commit
- ${BACKEND_SDK_TESTING_PATH:-../backend-sdk-testing}:/cross-sdk-tests
- cross-sdk-node-modules:/cross-sdk-tests/node_modules
depends_on:
core:
condition: service_healthy
mem_limit: 8g
cpus: 8
pids_limit: 4096
volumes:
pip-cache:
pre-commit-cache:
cross-sdk-node-modules: