Skip to content

Instantly share code, notes, and snippets.

@bananu7
Created March 13, 2021 10:57
Show Gist options
  • Save bananu7/91b3549cc38aaba0481027bae5aec3b9 to your computer and use it in GitHub Desktop.
Save bananu7/91b3549cc38aaba0481027bae5aec3b9 to your computer and use it in GitHub Desktop.
version: '3'
services:
cockroachdb:
container_name: cockroachdb
image: cockroachdb/cockroach:latest-v20.2
command: start-single-node --insecure --store=attrs=ssd,path=/var/lib/cockroach/
restart: "no"
volumes:
- data:/var/lib/cockroach
expose:
- "8080"
- "26257"
ports:
- "26257:26257"
- "8080:8080"
nakama:
container_name: nakama
image: heroiclabs/nakama:latest
entrypoint:
- "/bin/sh"
- "-ecx"
- >
/nakama/nakama migrate up --database.address root@cockroachdb:26257 &&
exec /nakama/nakama --name nakama1 --database.address root@cockroachdb:26257
restart: always
links:
- "cockroachdb:db"
depends_on:
- cockroachdb
volumes:
- ./:/nakama/data
expose:
- "7349"
- "7350"
- "7351"
ports:
- "7349:7349"
- "7350:7350"
- "7351:7351"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7350/"]
interval: 10s
timeout: 5s
retries: 5
volumes:
data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment