forked from Argus-Labs/starter-game-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
82 lines (82 loc) · 1.98 KB
/
docker-compose.yml
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
version: "3"
services:
postgres:
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all
environment:
- POSTGRES_DB=nakama
- POSTGRES_PASSWORD=localdb
expose:
- "8080"
- "5432"
image: postgres:12.2-alpine
ports:
- "5432:5432"
- "8080:8080"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "nakama"]
interval: 3s
timeout: 3s
retries: 5
volumes:
- data:/var/lib/postgresql/data
redis: # This doesn't have the correct persistence settings. Don't use on for prod.
image: redis:latest
command: redis-server # TODO: This runs without password. Don't use for prod.
expose:
- "6379"
ports:
- "6379:6379"
restart: always
cardinal:
build: ./cardinal
depends_on:
- redis
expose:
- "3333"
ports:
- "3333:3333"
environment:
- CARDINAL_PORT=3333
- REDIS_ADDR=redis:6379
- REDIS_MODE=normal
nakama:
build: ./nakama
depends_on:
- postgres
- cardinal
environment:
- CARDINAL_ADDR=${CARDINAL_ADDR:-http://cardinal:3333}
- CARDINAL_NAMESPACE=0
entrypoint:
- "/bin/sh"
- "-ecx"
- >
/nakama/nakama migrate up --database.address postgres:localdb@postgres:5432/nakama &&
exec /nakama/nakama --config /nakama/data/local.yml --database.address postgres:localdb@postgres:5432/nakama
extra_hosts:
- "host.docker.internal:host-gateway"
expose:
- "7349"
- "7350"
- "7351"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7350/"]
interval: 10s
timeout: 5s
retries: 5
links:
- "postgres:db"
ports:
- "7349:7349"
- "7350:7350"
- "7351:7351"
restart: unless-stopped
testsuite:
build: ./testsuite
depends_on:
- cardinal
- nakama
environment:
- NAKAMA_ADDRESS=http://nakama:7350
volumes:
data: