Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
120 lines (113 loc) · 2.81 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
120 lines (113 loc) · 2.81 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
version: '3.8'
services:
mcp-notify:
build:
context: .
dockerfile: Dockerfile
args:
VERSION: ${VERSION:-dev}
COMMIT: ${COMMIT:-unknown}
BUILD_DATE: ${BUILD_DATE:-unknown}
image: mcp-notify:latest
container_name: mcp-notify
restart: unless-stopped
ports:
- "8080:8080" # API
- "9090:9090" # Metrics
environment:
- MCP_WATCH_DATABASE_URL=postgres://mcp:mcp@postgres:5432/mcp_watch?sslmode=disable
- MCP_WATCH_REDIS_URL=redis://redis:6379/0
- MCP_WATCH_LOG_LEVEL=info
volumes:
- ./config.yaml:/app/config.yaml:ro
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- mcp-network
postgres:
image: postgres:15-alpine
container_name: mcp-postgres
restart: unless-stopped
environment:
POSTGRES_USER: mcp
POSTGRES_PASSWORD: mcp
POSTGRES_DB: mcp_watch
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mcp -d mcp_watch"]
interval: 10s
timeout: 5s
retries: 5
networks:
- mcp-network
redis:
image: redis:7-alpine
container_name: mcp-redis
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis_data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- mcp-network
# Optional: Prometheus for metrics
prometheus:
image: prom/prometheus:v2.48.0
container_name: mcp-prometheus
restart: unless-stopped
ports:
- "9091:9090"
volumes:
- ./deploy/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.enable-lifecycle'
networks:
- mcp-network
profiles:
- monitoring
# Optional: Grafana for dashboards
grafana:
image: grafana/grafana:10.2.2
container_name: mcp-grafana
restart: unless-stopped
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- grafana_data:/var/lib/grafana
- ./deploy/grafana/provisioning:/etc/grafana/provisioning:ro
networks:
- mcp-network
profiles:
- monitoring
volumes:
postgres_data:
redis_data:
prometheus_data:
grafana_data:
networks:
mcp-network:
driver: bridge