-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (60 loc) · 1.55 KB
/
docker-compose.yml
File metadata and controls
65 lines (60 loc) · 1.55 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
version: '3.8'
services:
gomcp:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- MCP_HOST=0.0.0.0
- MCP_PORT=8080
- MCP_TRANSPORT_PROTOCOL=http
- LOG_LEVEL=INFO
- ENABLE_AUTH=true
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=gomcp
- POSTGRES_USER=gomcp
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-gomcp_dev_password}
- POSTGRES_POOL_SIZE=10
- POSTGRES_MAX_CONNECTIONS=20
- SESSION_SECRET=${SESSION_SECRET:-dev_session_secret_change_in_prod}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
networks:
- gomcp-network
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_DB=gomcp
- POSTGRES_USER=gomcp
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-gomcp_dev_password}
- POSTGRES_INITDB_ARGS=--encoding=UTF-8
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gomcp -d gomcp"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- gomcp-network
volumes:
postgres_data:
driver: local
networks:
gomcp-network:
driver: bridge