-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) · 3.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (94 loc) · 3.65 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
# sql-to-mcp: AnythingMCP, pulled from Docker Hub, plus demo PostgreSQL and MySQL databases.
# Generated from docker-compose.quickstart.yml in HelpCode-ai/anythingmcp.
# Start it with ./scripts/install.sh, which also writes .env.
name: ${COMPOSE_PROJECT_NAME:-amcp}
services:
app:
image: helpcodeai/anythingmcp:latest
# The published image is amd64 only (arm64 is blocked upstream by a Prisma
# bug — see .github/workflows/docker-publish.yml). Pinning the platform
# makes this file work on Apple Silicon too, through Docker Desktop's
# emulation. Measured at 24 s to a healthy API on an M-series laptop; older
# hardware emulating amd64 will be slower.
platform: linux/amd64
container_name: ${COMPOSE_PROJECT_NAME:-amcp}-app
# Loopback only, and deliberately not configurable here: the quickstart has
# no TLS and no reverse proxy in front of it.
ports:
- "127.0.0.1:${FRONTEND_PORT:-3000}:3000"
- "127.0.0.1:${BACKEND_PORT:-4000}:4000"
environment:
- NODE_ENV=production
- PORT=4000
- NEXT_PUBLIC_API_URL=http://localhost:${BACKEND_PORT:-4000}
- DATABASE_URL=postgresql://amcp:${POSTGRES_PASSWORD:-amcp}@postgres:5432/anythingmcp
# Required. The app refuses to boot on a placeholder value, by design.
- JWT_SECRET=${JWT_SECRET:?set JWT_SECRET in .env - openssl rand -hex 32}
- ENCRYPTION_KEY=${ENCRYPTION_KEY:?set ENCRYPTION_KEY in .env - openssl rand -hex 32}
- CORS_ORIGIN=http://localhost:${FRONTEND_PORT:-3000}
- SERVER_URL=http://localhost:${BACKEND_PORT:-4000}
- FRONTEND_URL=http://localhost:${FRONTEND_PORT:-3000}
# Anyone who can reach the port still needs an MCP credential.
- MCP_AUTH_MODE=legacy
- MCP_ALLOW_ANONYMOUS=false
# Invite-only after the first admin registers.
- ALLOW_OPEN_REGISTRATION=false
# The demo services are private Docker hostnames; the SSRF guard blocks
# those unless they are listed here.
- SSRF_ALLOWED_HOSTS=pg-demo,mysql-demo
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4000/health"]
interval: 5s
timeout: 5s
retries: 20
start_period: 20s
restart: unless-stopped
pg-demo:
image: postgres:17-alpine
container_name: ${COMPOSE_PROJECT_NAME:-amcp}-pg-demo
environment:
- POSTGRES_USER=shop_owner
- POSTGRES_PASSWORD=shop_owner
- POSTGRES_DB=shop
volumes:
- ./examples/sql-demo/postgres.sql:/docker-entrypoint-initdb.d/10-shop.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U shop_owner -d shop"]
interval: 3s
timeout: 3s
retries: 30
restart: unless-stopped
mysql-demo:
image: mysql:8
container_name: ${COMPOSE_PROJECT_NAME:-amcp}-mysql-demo
environment:
- MYSQL_ROOT_PASSWORD=root-demo
- MYSQL_DATABASE=shop
volumes:
- ./examples/sql-demo/mysql.sql:/docker-entrypoint-initdb.d/10-shop.sql:ro
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -proot-demo --silent"]
interval: 3s
timeout: 3s
retries: 30
restart: unless-stopped
postgres:
image: postgres:17-alpine
container_name: ${COMPOSE_PROJECT_NAME:-amcp}-postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=amcp
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-amcp}
- POSTGRES_DB=anythingmcp
healthcheck:
test: ["CMD-SHELL", "pg_isready -U amcp -d anythingmcp"]
interval: 3s
timeout: 3s
retries: 10
restart: unless-stopped
volumes:
postgres_data: