forked from Argus-Labs/world-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
203 lines (193 loc) · 5.78 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
services:
cockroachdb:
container_name: cockroachdb
# Only use cockroachdb single-node clusters for non-production environment
image: cockroachdb/cockroach:latest-v23.1
command: start-single-node --insecure --store=attrs=ssd,path=/var/lib/cockroach/,size=20%
restart: unless-stopped
environment:
- COCKROACH_DATABASE=nakama
- COCKROACH_USER=root
- COCKROACH_PASSWORD=${DB_PASSWORD:-development}
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
networks:
- world-engine
nakama:
container_name: relay_nakama # Do not change this without changing the e2e-nakama makescript or e2e test will fail
platform: linux/amd64
build:
context: ./relay/nakama
target: nakama # Build the amd64 version of the image
depends_on:
cockroachdb:
condition: service_healthy
game:
condition: service_started
environment:
- CARDINAL_ADDR=game:4040
- ENABLE_DEBUG=TRUE
- CARDINAL_NAMESPACE=testgame
- ENABLE_ALLOWLIST=${ENABLE_ALLOWLIST:-false}
- DB_PASSWORD=${DB_PASSWORD:-development}
entrypoint:
- "/bin/sh"
- "-ecx"
- >
/nakama/nakama migrate up --database.address root:${DB_PASSWORD:-development}@cockroachdb:26257/nakama &&
exec /nakama/nakama --config /nakama/data/local.yml --database.address root:${DB_PASSWORD:-development}@cockroachdb:26257/nakama --socket.outgoing_queue_size=${OUTGOING_QUEUE_SIZE:-64}
expose:
- "7349"
- "7350"
- "7351"
ports:
- "7349:7349"
- "7350:7350"
- "7351:7351"
healthcheck:
test: [ "CMD", "/nakama/nakama", "healthcheck" ]
interval: 1s
timeout: 1s
retries: 20
restart: unless-stopped
networks:
- world-engine
chain:
container_name: evm_base_shard
environment:
## Env vars reference: https://github.com/Argus-Labs/world-engine/blob/main/evm/README.md
## Get AUTH_TOKEN from celestia_devnet container: `$(docker exec $(docker ps -q) celestia bridge auth admin --node.store /home/celestia/bridge`
- DA_BASE_URL=${DA_BASE_URL:-http://celestia_devnet}
- DA_AUTH_TOKEN=${DA_AUTH_TOKEN:-}
- FAUCET_ENABLED=${FAUCET_ENABLED:-false}
- FAUCET_ADDRESS=${FAUCET_ADDRESS:-aa9288F88233Eb887d194fF2215Cf1776a6FEE41} # ETH address without leading 0x (Default: account 0 of CHAIN_KEY_MNEMONIC)
- FAUCET_AMOUNT=${FAUCET_AMOUNT:-0x56BC75E2D63100000} # ETH in wei unit, encoded as hexadecimal. (Default: 100 ETH)
- BASE_SHARD_ROUTER_KEY=${BASE_SHARD_ROUTER_KEY:-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ01} # Secure auth token for game shard
build:
context: evm
dockerfile: Dockerfile
restart: unless-stopped
expose:
- "1317"
- "26657"
- "9090"
- "9601"
ports:
- "1317:1317"
- "26657:26657"
- "9090:9090"
- "9601:9601"
- "8545:8545"
networks:
- world-engine
depends_on:
- celestia-devnet
celestia-devnet:
container_name: celestia_devnet
image: ghcr.io/rollkit/local-celestia-devnet:latest
networks:
- world-engine
restart: on-failure
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:26659/head" ]
interval: 1s
timeout: 1s
retries: 20
ports:
- "26657"
- "26658:26658"
- "26659:26659"
- "9090"
game:
container_name: test_game
environment:
- CARDINAL_NAMESPACE=${CARDINAL_NAMESPACE:-testgame}
- CARDINAL_ROLLUP_ENABLED=${CARDINAL_ROLLUP_ENABLED:-false}
- CARDINAL_LOG_LEVEL=${CARDINAL_LOG_LEVEL:-info}
- CARDINAL_LOG_PRETTY=${CARDINAL_LOG_PRETTY:-true}
- REDIS_ADDRESS=${REDIS_ADDRESS:-redis:6379}
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
- BASE_SHARD_SEQUENCER_ADDRESS=${BASE_SHARD_SEQUENCER_ADDRESS:-chain:9601}
- BASE_SHARD_ROUTER_KEY=${BASE_SHARD_ROUTER_KEY:-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ01}
- TELEMETRY_TRACE_ENABLED=${TELEMETRY_TRACE_ENABLED:-false}
- TELEMETRY_PROFILER_ENABLED=${TELEMETRY_PROFILER_ENABLED:-false}
- DD_AGENT_HOST=datadog
- DD_ENV=local
- DD_SERVICE=world-engine-cardinal-local
build:
context: ./
dockerfile: e2e/testgames/game/Dockerfile
restart: unless-stopped
expose:
- "4040"
ports:
- "4040:4040"
- "9020:9020"
depends_on:
- redis
networks:
- world-engine
redis:
container_name: redis
image: redis:latest
command: redis-server --save ""
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
expose:
- "6379"
ports:
- "6379:6379"
networks:
- world-engine
restart: unless-stopped
test_nakama:
container_name: test_nakama
build:
context: ./
dockerfile: e2e/tests/nakama/Dockerfile
depends_on:
nakama:
condition: service_healthy
environment:
- NAKAMA_ADDRESS=http://nakama:7350
networks:
- world-engine
jaeger:
container_name: jaeger
image: jaegertracing/all-in-one:latest
environment:
- COLLECTOR_OTLP_ENABLED=true
ports:
- "16686:16686"
- "4317:4317"
- "4318:4318"
networks:
- world-engine
datadog:
image: datadog/agent:7
pid: host
environment:
- DD_API_KEY=${DD_API_KEY:-}
- DD_SITE=us3.datadoghq.com
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /proc/:/host/proc/:ro
- /sys/fs/cgroup:/host/sys/fs/cgroup:ro
networks:
- world-engine
volumes:
data:
networks:
world-engine:
driver: bridge