53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
version: "3"
|
|
services:
|
|
postgres:
|
|
container_name: postgres
|
|
image: postgres:12.2-alpine
|
|
environment:
|
|
- POSTGRES_DB=nakama
|
|
- POSTGRES_PASSWORD=localdb
|
|
volumes:
|
|
- data:/var/lib/postgresql/data
|
|
expose:
|
|
- "8080"
|
|
- "5432"
|
|
ports:
|
|
- "5432:5432"
|
|
- "8080:8080"
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "nakama"]
|
|
interval: 3s
|
|
timeout: 3s
|
|
retries: 5
|
|
nakama:
|
|
container_name: nakama
|
|
image: registry.heroiclabs.com/heroiclabs/nakama:3.22.0
|
|
entrypoint:
|
|
- "/bin/sh"
|
|
- "-ecx"
|
|
- >
|
|
/nakama/nakama migrate up --database.address postgres:localdb@postgres:5432/nakama &&
|
|
exec /nakama/nakama --name nakama1 --database.address postgres:localdb@postgres:5432/nakama --logger.level DEBUG --session.token_expiry_sec 7200 --config /nakama/data/config.yml
|
|
restart: always
|
|
links:
|
|
- "postgres:db"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./data:/nakama/data
|
|
expose:
|
|
- "7349"
|
|
- "7350"
|
|
- "7351"
|
|
ports:
|
|
- "7349:7349"
|
|
- "7350:7350"
|
|
- "7351:7351"
|
|
healthcheck:
|
|
test: ["CMD", "/nakama/nakama", "healthcheck"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
data: |