-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
95 lines (91 loc) · 2.39 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
#volumes:
# pgkwil:
# driver: local
services:
db:
image: kwildb/postgres:16.5-1
ports:
- "5432"
restart: always
user: postgres
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_INITDB_ARGS: --data-checksums
# Setting user/pass/db works, but we use docker-entrypoint-initdb.d instead for more control
# POSTGRES_USER: kwild
# POSTGRES_PASSWORD: kwild
# POSTGRES_DB: kwild
volumes:
- /var/lib/postgresql/data
networks:
- kwil-reward
healthcheck:
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 && sleep 1"]
interval: 2s
timeout: 6s
retries: 10
kwild:
image: kwild:latest
ports:
- "8484:8484"
- "6600:6600"
environment:
GORACE: "halt_on_error=1 log_path=/app/kwil/datarace"
volumes:
- type: bind
source: /tmp/.testnet/node0
target: /app/kwil
networks:
- kwil-reward
depends_on:
db:
condition: service_healthy
# we config --consensus so auto mine a block every 1s
command: |
start
--root=/app/kwil
--log-format=plain
--admin.listen=/tmp/kwild.socket
--rpc.listen=0.0.0.0:8484
--p2p.listen=0.0.0.0:6600
--db.host=db
--db.port=5432
--db.user=kwild
--db.pass=kwild
--consensus.propose-timeout=1s
--consensus.empty-block-timeout=1s
--erc20-reward-signer.enable=true
--erc20-reward-signer.targets=rewards
--erc20-reward-signer.private-keys=$TEST_PK
--erc20-reward-signer.eth-rpcs=$SEPOLIA_RPC
--
--extensions.sepolia_sync.provider $SEPOLIA_RPC_WSS
--extensions.sepolia_sync.block_sync_chunk_size='1000000'
healthcheck:
test: [ "CMD", "curl", "--fail-with-body", "-s", "http://localhost:8484/api/v1/health/user" ]
interval: 2s
timeout: 6s
retries: 10
poster:
image: kwil-reward-poster:latest
build:
context: .
dockerfile: ./peripheral/poster/Dockerfile
networks:
- kwil-reward
volumes:
- type: bind
source: /tmp/kwil-reward-postersvc-config.json
target: /conf/config.json
command: npx tsx peripheral/poster/cli.ts /conf/config.json
depends_on:
kwild:
condition: service_healthy
restart: always
networks:
kwil-reward:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.5.100.0/23