-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (79 loc) · 2.27 KB
/
docker-compose.yml
File metadata and controls
83 lines (79 loc) · 2.27 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
# Local MCP Gateway - Docker Compose for Local Development
#
# Build and run from source:
# docker compose up -d --build
#
# Access:
# - UI: http://localhost:3000
# - Backend API: http://localhost:3001
# - MCP Endpoint: http://localhost:3001/api/mcp/default
#
# Data is stored in the pgdata Docker volume.
services:
postgres:
image: postgres:17-alpine
container_name: local-mcp-postgres-dev
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: local_mcp_gateway
ports:
- "5433:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
backend:
build:
context: .
dockerfile: apps/backend/Dockerfile
container_name: local-mcp-backend-dev
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/local_mcp_gateway
- LOG_LEVEL=log
- CORS_ORIGINS=http://localhost:3000,http://localhost:5173
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-}
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3001}
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:3000}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID:-}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET:-}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
frontend:
build:
context: .
dockerfile: apps/frontend/Dockerfile
args:
# For local dev, frontend calls backend on localhost:3001
VITE_API_URL: http://localhost:3001
container_name: local-mcp-frontend-dev
ports:
- "3000:80"
environment:
- NGINX_ENTRYPOINT_QUIET_LOGS=1
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
volumes:
pgdata: