-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdocker-compose.yml
53 lines (48 loc) · 1.28 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
version: '3.8'
services:
node:
container_name: node
image: oven/bun:1.1.26
working_dir: /app
volumes:
- ./chopsticks:/app/chopsticks
# TODO: cache does not seem to work
# - ~/.bun/install/cache:/root/.bun/install/cache
command:
bunx @acala-network/[email protected] -c /app/chopsticks/configs/acala.yml -p 9944
ports:
- 9944:9944
healthcheck:
# bun image doesn't have wget or curl ...
test: |
bun --eval '
fetch("http://localhost:9944", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ id: 1, jsonrpc: "2.0", method: "system_health", params: [] })
})
.then(res => res.json())
.then(data => {
const exitCode = data.result ? 0 : 1;
process.exit(exitCode)
})
.catch(() => process.exit(1));
'
interval: 2s
timeout: 5s
retries: 100
node-ready:
image: alpine:latest
restart: on-failure
depends_on:
node:
condition: service_healthy
command: echo "node ready 🚀"
eth-rpc:
image: acala/eth-rpc-adapter:2.9.4
ports:
- 8545:8545
command:
- -e=ws://node:9944
depends_on:
- node-ready