forked from Argus-Labs/starter-game-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
158 lines (151 loc) · 4.83 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
version: "3"
services:
cardinal:
container_name: cardinal
build: ./cardinal
depends_on:
- redis
expose:
- "3333"
ports:
- "3333:3333"
environment:
- CARDINAL_PORT=${CARDINAL_PORT}
- CARDINAL_NAMESPACE=${CARDINAL_NAMESPACE}
- CARDINAL_MODE=${CARDINAL_MODE}
- REDIS_ADDRESS=${REDIS_ADDRESS:-redis:6379}
- REDIS_PASSWORD=${REDIS_PASSWORD}
- REDIS_MODE=normal
restart: unless-stopped
evm:
container_name: evm_base_shard
environment:
# DA_AUTH_TOKEN is obtained from celestia client and passed in from world.toml.
# See https://docs.celestia.org/developers/node-tutorial#auth-token
- DA_AUTH_TOKEN=${DA_AUTH_TOKEN:-}
- DA_BASE_URL=${DA_BASE_URL:-http://celestia-devnet:26658}
- DA_NAMESPACE_ID=${DA_NAMESPACE_ID:-67480c4a88c4d12935d4}
- CHAIN_ID=${CHAIN_ID:-world-engine}
# KEY_MNEMONIC is a test mnemonic and should not be used in production.
# This mnemonic can be overwritten by setting the KEY_MNEMONIC environment variable.
- KEY_MNEMONIC=${KEY_MNEMONIC:-enact adjust liberty squirrel bulk ticket invest tissue antique window thank slam unknown fury script among bread social switch glide wool clog flag enroll}
- FAUCET_ADDR=${FAUCET_ADDR:-world142fg37yzx04cslgeflezzh83wa4xlmjpms0sg5}
# Note, ":-" signals a default value of "1s", NOT negative 1 second.
- BLOCK_TIME=${BLOCK_TIME:-1s}
image: us-docker.pkg.dev/argus-labs/world-engine/chain:latest
expose:
- "1317"
- "26657"
- "9090"
- "9601"
- "8545"
ports:
- "1317:1317"
- "26657:26657"
- "9090:9090"
- "9601:9601"
- "8545:8545"
nakama:
platform: linux/amd64
image: us-docker.pkg.dev/argus-labs/world-engine/relay/nakama@sha256:60737f1de75b5e1dfe0f1eb557ebf6f8c691cc2812950dc4e3132242709ddc09
container_name: nakama
depends_on:
nakama-db:
condition: service_healthy
cardinal:
condition: service_started
environment:
- CARDINAL_ADDR=${CARDINAL_ADDR:-cardinal:4040}
- CARDINAL_NAMESPACE=${CARDINAL_NAMESPACE}
- DB_PASSWORD=${DB_PASSWORD:-very_unsafe_password_replace_me}
entrypoint:
- "/bin/sh"
- "-ecx"
- >
/nakama/nakama migrate up --database.address postgres:$$DB_PASSWORD@nakama-db:5432/nakama &&
exec /nakama/nakama --config /nakama/data/local.yml --database.address postgres:$$DB_PASSWORD@nakama-db:5432/nakama
# Replace entrypoint with the following when using cockroachdb instead of postgres.
# entrypoint:
# - "/bin/sh"
# - "-ecx"
# - >
# /nakama/nakama migrate up --database.address root:$$DB_PASSWORD@nakama-db:26257/nakama &&
# exec /nakama/nakama --config /nakama/data/local.yml --database.address root:$$DB_PASSWORD@nakama-db:26257/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
ports:
- "7349:7349"
- "7350:7350"
- "7351:7351"
restart: unless-stopped
nakama-db:
container_name: nakama_db
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all
environment:
- POSTGRES_DB=nakama
- POSTGRES_PASSWORD=${DB_PASSWORD:-very_unsafe_password_replace_me}
- PGDATA=/var/lib/postgresql/data
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
# Recommended: Use cockroachdb instead of postgres for production.
# container_name: nakama_db
# image: cockroachdb/cockroach:latest-v23.1
# command: start-single-node --insecure --store=attrs=ssd,path=/var/lib/cockroach/,size=20%
# restart: "no"
# environment:
# - COCKROACH_DATABASE=nakama
# - COCKROACH_USER=root
# - COCKROACH_PASSWORD=${DB_PASSWORD:-very_unsafe_password_replace_me}
# volumes:
# - data:/var/lib/cockroach
# expose:
# - "8080"
# - "26257"
# ports:
# - "26257:26257"
# - "8080:8080"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
# interval: 3s
# timeout: 3s
# retries: 5
redis:
image: redis:latest
command: redis-server
expose:
- "6379"
ports:
- "6379:6379"
restart: always
celestia-devnet:
container_name: celestia_devnet
image: ghcr.io/rollkit/local-celestia-devnet:v0.12.1
restart: on-failure
ports:
- "26657"
- "26658"
- "26659"
- "9090"
volumes:
data: