-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
126 lines (120 loc) · 3.15 KB
/
docker-compose.yml
File metadata and controls
126 lines (120 loc) · 3.15 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: healthcare-postgres
restart: unless-stopped
environment:
POSTGRES_DB: healthcare_ai_db
POSTGRES_USER: healthcare_user
POSTGRES_PASSWORD: healthcare_pass
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./infrastructure/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U healthcare_user -d healthcare_ai_db"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- healthcare-network
# MCP Server - Clinical Decision Support Tools
mcp-server:
build:
context: ./mcp-server
dockerfile: Dockerfile
container_name: healthcare-mcp-server
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
NODE_ENV: production
MCP_SERVER_PORT: 3001
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: healthcare_ai_db
DB_USER: healthcare_user
DB_PASSWORD: healthcare_pass
ports:
- "3001:3001"
healthcheck:
test: ["CMD-SHELL", "node -e \"console.log('healthy')\" || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
networks:
- healthcare-network
# Backend API Service
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: healthcare-backend
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
mcp-server:
condition: service_healthy
environment:
NODE_ENV: production
PORT: 3000
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: healthcare_ai_db
DB_USER: healthcare_user
DB_PASSWORD: healthcare_pass
CORS_ORIGIN: http://localhost:8080
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
MCP_SERVER_URL: http://mcp-server:3001
ports:
- "3000:3000"
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- healthcare-network
# Frontend Web Service
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_URL: http://localhost:3000
container_name: healthcare-frontend
restart: unless-stopped
depends_on:
backend:
condition: service_healthy
environment:
VITE_API_URL: http://localhost:3000
ports:
- "8080:8080"
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/ || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- healthcare-network
# Named volumes for data persistence
volumes:
postgres-data:
driver: local
name: healthcare-postgres-data
# Custom network for service communication
networks:
healthcare-network:
driver: bridge
name: healthcare-network