-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
53 lines (51 loc) · 1.28 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
services:
postgres:
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all
container_name: nk_gamelift_pg
environment:
- POSTGRES_DB=nakama
- POSTGRES_HOST_AUTH_METHOD=trust
expose:
- "8080"
- "5432"
image: postgres:16.1-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
nakama:
build: .
container_name: nk_gamelift
depends_on:
postgres:
condition: service_healthy
entrypoint:
- "/bin/sh"
- "-ecx"
- >
/nakama/nakama migrate up --database.address postgres:@postgres:5432/nakama?sslmode=disable &&
exec /nakama/nakama --config /nakama/data/local.yml --database.address postgres:@postgres:5432/nakama?sslmode=disable
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
volumes:
data: