Repository navigation
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
executable file
·220 lines (213 loc) · 6.15 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
executable file
·220 lines (213 loc) · 6.15 KB
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
name: test
services:
nodes_test_db:
container_name: "nodes_test_db"
image: "postgres:12.6-alpine"
restart: no
healthcheck:
test: "pg_isready -U walter -d postgres"
interval: 5s
timeout: 15s
retries: 5
env_file:
- .env.test
extra_hosts:
- host.docker.internal:host-gateway
ports:
- "5434:5432"
nodes_backend_test:
container_name: "nodes_backend_test"
build:
context: ./desci-server
dockerfile: Dockerfile.ci
target: test
entrypoint: ["/bin/sh", "./scripts/be-node-test.sh"]
restart: no
env_file:
- .env.test
environment:
# Conditionally start the server instead of invoking the integration test suite
RUN_SERVER: ${RUN_SERVER:-0}
DPID_URL_OVERRIDE: http://dpid_resolver_test:5460
# This is set in CI but not automatically passed to the container
GITHUB_ACTIONS: ${GITHUB_ACTIONS:-false}
ports:
- "5421:5421"
- "9227:9227"
- "5557:5555"
extra_hosts:
- host.docker.internal:host-gateway
depends_on:
nodes_test_sync_service:
condition: service_healthy
nodes_test_db:
condition: service_healthy
nodes_test_ipfs:
condition: service_healthy
test_blockchain:
condition: service_healthy
dpid_resolver_test:
condition: service_started
healthcheck:
test: curl -f http://localhost:5421/readyz || exit 1
interval: 5s
timeout: 10s
retries: 10
start_period: 30s
test_blockchain:
container_name: "test_blockchain"
build:
context: desci-contracts
restart: no
healthcheck:
test: curl -sf -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' localhost:8545
interval: 10s
timeout: 15s
retries: 10
ports:
- "8545:8545"
env_file:
- desci-contracts/.env.test
environment:
PG_PORT: 5434
SKIP_SUBGRAPH: 1
extra_hosts:
- host.docker.internal:host-gateway
depends_on:
nodes_test_db:
condition: service_healthy
nodes_test_ipfs:
image: ipfs/kubo:v0.26.0
restart: no
environment:
IPFS_SWARM_KEY: "/key/swarm/psk/1.0.0/\n/base16/\n9d002c50635a479d29dcc0ccb49d862952a0dcc52baddd253167adcd496c8d04"
ports:
- "5003:5001"
- "8091:8080"
command:
# These are defaults from the go-ipfs dockerfile CMD
- "daemon"
- "--migrate=true"
- "--agent-version-suffix=docker"
# This is necessary before ceramic ships Recon, the new tip gossip protocol
- "--enable-pubsub-experiment"
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- ./local-data/test/ipfs:/data/ipfs
healthcheck:
test: ipfs ls QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1
interval: 5s
retries: 5
start_period: 10s
timeout: 2s
nodes_test_sync_service:
container_name: nodes_sync_test_worker
build:
context: ./sync-server
dockerfile: Dockerfile
image: worker_test
restart: no
ports:
- "5446:5445"
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- ./sync-server:/usr/src/app
- /usr/src/app/node_modules
depends_on:
nodes_test_db:
condition: service_healthy
env_file:
- ./sync-server/.env.test
healthcheck:
test: curl -f http://localhost:5445/health || exit 1
interval: 5s
timeout: 10s
retries: 5
start_period: 15s
nodes_lib_test:
container_name: nodes_lib_test
build:
context: ./nodes-lib
dockerfile: Dockerfile.test
entrypoint: ["/bin/sh", "-c"]
command: ["sleep 5 && npm test"]
restart: no
environment:
NODES_API_URL: http://nodes_backend_test:5421
CHAIN_RPC_URL: http://test_blockchain:8545
CERAMIC_ONE_RPC_URL: http://ceramic_one_test:5101
CERAMIC_ONE_FLIGHT_URL: http://ceramic_one_test:5102
# This is set in CI but not automatically passed to the container
GITHUB_ACTIONS: ${GITHUB_ACTIONS:-false}
depends_on:
nodes_backend_test:
condition: service_healthy
test_blockchain:
condition: service_healthy
ceramic_one_test:
condition: service_healthy
extra_hosts:
- host.docker.internal:host-gateway
ceramic_one_test:
container_name: ceramic_one_test
image: public.ecr.aws/m3e8d9d6/desci-labs/ceramic-one:0.58.1
restart: no
ports:
- 5101:5101 # RPC
- 5102:5102 # flight SQL (> v0.53.0)
environment:
CERAMIC_ONE_STORE_DIR: "/data/ceramic-one"
CERAMIC_ONE_P2P_KEY_DIR: "/data/ceramic-one"
CERAMIC_ONE_BIND_ADDRESS: "0.0.0.0:5101"
CERAMIC_ONE_SWARM_ADDRESSES: "/ip4/0.0.0.0/tcp/4101,/ip4/0.0.0.0/udp/4102/quic-v1"
CERAMIC_ONE_METRICS_BIND_ADDRESS: "0.0.0.0:9465"
CERAMIC_ONE_FLIGHT_SQL_BIND_ADDRESS: "0.0.0.0:5102"
CERAMIC_ONE_NETWORK: "inmemory"
RUST_LOG: "warn"
CERAMIC_ONE_LOG_FORMAT: "multi-line"
volumes:
- ./local-data/test/ceramic-one:/data/ceramic-one
healthcheck:
test:
[
"CMD",
"ceramic-one",
"query",
"statement-query",
"select null from event_states limit 1",
]
interval: 5s
timeout: 5s
retries: 5
dpid_resolver_test:
image: descilabs/dpid-resolver:develop
container_name: dpid_resolver_test
restart: no
# Uncomment and set to local repo path for tinkering
# build:
# context: ~/dev/desci/dpid-resolver
environment:
DPID_ENV: local
OPTIMISM_RPC_URL: http://test_blockchain:8545
CERAMIC_FLIGHT_URL: http://ceramic_one_test:5102
IPFS_GATEWAY: http://nodes_test_ipfs:8080/ipfs
CACHE_TTL_ANCHORED: 86400
CACHE_TTL_PENDING: 300
ports:
- "5460:5460"
healthcheck:
test: ["CMD", "curl", "--fail-with-body", "http://localhost:5460/healthz"]
interval: 5s
timeout: 5s
retries: 5
extra_hosts:
- host.docker.internal:host-gateway
depends_on:
nodes_test_ipfs:
condition: service_healthy
test_blockchain:
condition: service_healthy
ceramic_one_test:
condition: service_healthy