-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.multi-pod.yml
More file actions
51 lines (48 loc) · 1.26 KB
/
docker-compose.multi-pod.yml
File metadata and controls
51 lines (48 loc) · 1.26 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
networks:
socca2-network:
enable_ipv6: true
ipam:
config:
- subnet: fd00::/80
services:
# Client - Static files served by nginx
client:
build:
context: .
dockerfile: Dockerfile.client
ports:
- "${CLIENT_PORT:-80}:8080"
environment:
# For local dev with custom port: SERVER_URL=http://localhost:3001
# For production: SERVER_URL=https://api.yourdomain.com
- SERVER_URL=${SERVER_URL:-http://localhost:3000}
restart: unless-stopped
networks:
- socca2-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
depends_on:
- server
# Server - Colyseus game server
server:
build:
context: .
dockerfile: Dockerfile.server
ports:
- "${SERVER_PORT:-3000}:3000"
environment:
- NODE_ENV=production
- PORT=3000
restart: unless-stopped
networks:
- socca2-network
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s