hello world
This commit is contained in:
70
docker-compose.yml
Normal file
70
docker-compose.yml
Normal file
@@ -0,0 +1,70 @@
|
||||
version: '3'
|
||||
services:
|
||||
postgres:
|
||||
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all
|
||||
container_name: template_nk_postgres
|
||||
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
|
||||
|
||||
plugin-builder:
|
||||
image: heroiclabs/nakama-pluginbuilder:3.21.0
|
||||
container_name: nk_plugin_builder
|
||||
working_dir: /workspace
|
||||
volumes:
|
||||
- ./:/workspace
|
||||
entrypoint:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p build
|
||||
go mod tidy
|
||||
go build --trimpath --buildmode=plugin -o build/main.so ./plugins
|
||||
|
||||
nakama:
|
||||
image: heroiclabs/nakama:3.21.0
|
||||
container_name: nk_backend
|
||||
depends_on:
|
||||
- postgres
|
||||
entrypoint:
|
||||
- "/bin/sh"
|
||||
- "-ecx"
|
||||
- >
|
||||
/nakama/nakama migrate up --database.address postgres:localdb@postgres:5432/nakama?sslmode=disable &&
|
||||
exec /nakama/nakama --config /nakama/data/local.yml --database.address postgres:localdb@postgres:5432/nakama?sslmode=disable
|
||||
volumes:
|
||||
- ./local.yml:/nakama/data/local.yml
|
||||
- ./build:/nakama/data/modules
|
||||
expose:
|
||||
- "7349"
|
||||
- "7350"
|
||||
- "7351"
|
||||
healthcheck:
|
||||
test: ["CMD", "/nakama/nakama", "healthcheck"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
links:
|
||||
- "postgres:db"
|
||||
ports:
|
||||
- "7349:7349"
|
||||
- "7350:7350"
|
||||
- "7351:7351"
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
data:
|
||||
Reference in New Issue
Block a user