-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.test.base.yml
177 lines (169 loc) · 4.88 KB
/
docker-compose.test.base.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
version: "3.8"
services:
subgraph_deployer_eth:
image: subgraph_deployer_eth
depends_on:
- graph-node_eth
- ipfs_eth
- postgres_eth
build:
context: ./local-subgraphs/light-bridge
dockerfile: Dockerfile.eth
subgraph_deployer_bnb:
image: subgraph_deployer_bnb
depends_on:
- graph-node_bnb
- ipfs_bnb
- postgres_bnb
build:
context: ./local-subgraphs/light-bridge
dockerfile: Dockerfile.bnb
graph-node_eth:
image: graphprotocol/graph-node:canary-57b2b042
depends_on:
- ipfs_eth
- postgres_eth
healthcheck:
test: [ "CMD", "curl -f http://localhost:8000/subgraphs/name/light-bridge/graphql || exit 1" ]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 2m
ports:
- "8000:8000"
- "8001:8001"
- "8020:8020"
- "8030:8030"
- "8040:8040"
extra_hosts:
- host.docker.internal:host-gateway
environment:
postgres_host: postgres_eth
postgres_user: graph-node
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: "ipfs_eth:5001"
ethereum: "local_eth:http://anvil_eth:8545"
GRAPH_LOG: info
ipfs_eth:
image: ipfs/kubo:v0.17.0
postgres_eth:
image: postgres:14
command:
[
"postgres",
"-cshared_preload_libraries=pg_stat_statements",
"-cmax_connections=200",
]
environment:
POSTGRES_USER: graph-node
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: graph-node
# FIXME: remove this env. var. which we shouldn't need. Introduced by
# <https://github.com/graphprotocol/graph-node:canary-57b2b042/pull/3511>, maybe as a
# workaround for https://github.com/docker/for-mac/issues/6270?
PGDATA: "/var/lib/postgresql/data"
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
graph-node_bnb:
image: graphprotocol/graph-node:canary-57b2b042
depends_on:
- ipfs_bnb
- postgres_bnb
extra_hosts:
- host.docker.internal:host-gateway
healthcheck:
test: [ "CMD", "curl -f http://localhost:8000/subgraphs/name/light-bridge/graphql || exit 1" ]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 2m
environment:
postgres_host: postgres_bnb
postgres_user: graph-node
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: "ipfs_bnb:5001"
ethereum: "local_bnb:http://anvil_bnb:8545"
GRAPH_LOG: info
ipfs_bnb:
image: ipfs/kubo:v0.17.0
postgres_bnb:
image: postgres:14
command:
[
"postgres",
"-cshared_preload_libraries=pg_stat_statements",
"-cmax_connections=200",
]
environment:
POSTGRES_USER: graph-node
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: graph-node
# FIXME: remove this env. var. which we shouldn't need. Introduced by
# <https://github.com/graphprotocol/graph-node:canary-57b2b042/pull/3511>, maybe as a
# workaround for https://github.com/docker/for-mac/issues/6270?
PGDATA: "/var/lib/postgresql/data"
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
anvil_bnb:
image: ghcr.io/foundry-rs/foundry:latest
command:
- "anvil --hardfork berlin --chain-id 31338" # use legacy tx to emulate boba network
environment:
- ANVIL_IP_ADDR=0.0.0.0
# ports:
# - "8546:8545"
anvil_eth:
image: ghcr.io/foundry-rs/foundry:latest
command:
- "anvil --chain-id 31337" # use EIP 1559 tx to emulate new network (e.g. Boba Sepolia)
environment:
- ANVIL_IP_ADDR=0.0.0.0
# ports:
# - "8545:8545"
lightbridge:
depends_on:
- lightbridge_db
- kms
- anvil_eth
- anvil_bnb
- graph-node_eth
- graph-node_bnb
image: bobanetwork/lightbridge:latest
build:
context: .
dockerfile: ./Dockerfile
command: bash -c "sleep 60; npm test"
environment:
LIGHTBRIDGE_MODE: "testnets"
LIGHTBRIDGE_REJECT_UNAUTHORIZED: "true"
# KMS setup (incl. defaults)
LIGHTBRIDGE_ENV: "dev"
LIGHTBRIDGE_AWS_KMS_ACCESS_KEY: "1"
LIGHTBRIDGE_AWS_KMS_SECRET_KEY: "2"
LIGHTBRIDGE_AWS_KMS_KEY_ID: "lb_disburser_pk"
LIGHTBRIDGE_AWS_KMS_REGION: "us-east-1"
LIGHTBRIDGE_AWS_KMS_ENDPOINT: "http://kms:8888/"
# DB
LIGHTBRIDGE_POSTGRES_PASSWORD: "abcdef"
LIGHTBRIDGE_POSTGRES_DB_HOST: "lightbridge_db" # always use local instance for tests
lightbridge_db:
image: postgres
deploy:
replicas: 1
environment:
POSTGRES_PASSWORD: "abcdef"
POSTGRES_DB: postgres
ports:
- "5432:5432"
#in no way should this be running in production
kms:
image: bobanetwork/local-kms:latest
environment:
PORT: "8888"
KMS_REGION: "us-east-1"
volumes:
- type: bind
source: ./test/kms-seed.yml
target: /init/seed.yaml # must be yaml, yml is not recognized
ports:
- 8888:8888