-
Notifications
You must be signed in to change notification settings - Fork 45
/
docker-compose.benchmark.yml
171 lines (163 loc) · 4.84 KB
/
docker-compose.benchmark.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
version: '3'
services:
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: "no"
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
platform: linux/amd64
build:
context: ./relay/nakama
target: nakama #
depends_on:
cockroachdb:
condition: service_healthy
game_benchmark:
condition: service_started
environment:
- CARDINAL_ADDR=game_benchmark: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@cockroachdb:26257/nakama &&
exec /nakama/nakama --config /nakama/data/local.yml --database.address root:$DB_PASSWORD@cockroachdb:26257/nakama
expose:
- "7349"
- "7350"
- "7351"
healthcheck:
test: [ "CMD", "/nakama/nakama", "healthcheck" ]
interval: 20s
timeout: 10s
retries: 5
ports:
- "7349:7349"
- "7350:7350"
- "7351:7351"
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:-"true"}
- 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:v0.12.1
networks:
- world-engine
restart: on-failure
ports:
- "26657"
- "26658:26658"
- "26659:26659"
- "9090"
game_benchmark:
container_name: test_benchmark_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:-false}
- 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_ENABLED=${TELEMETRY_ENABLED:-false}
- TELEMETRY_STATSD_ADDRESS=${TELEMETRY_STATSD_ADDRESS}
- TELEMETRY_TRACE_ADDRESS=${TELEMETRY_TRACE_ADDRESS}
build:
context: ./
dockerfile: e2e/testgames/gamebenchmark/Dockerfile
restart: unless-stopped
expose:
- "4040"
ports:
- "4040:4040"
- "9020:9020"
depends_on:
- redis
networks:
- world-engine
volumes:
- ./profiles:/profiles
redis:
image: redis:latest
command: redis-server --save ""
expose:
- "6379"
ports:
- "6379:6379"
networks:
- world-engine
restart: always
test_nakama_benchmark:
container_name: test_nakama_benchmark
build:
context: ./e2e/tests/
dockerfile: bench/Dockerfile
depends_on:
nakama:
condition: service_healthy
environment:
- NAKAMA_ADDRESS=http://nakama:7350
networks:
- world-engine
volumes:
data:
profiles:
networks:
world-engine:
driver: bridge