-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.dev.yml
executable file
·275 lines (264 loc) · 7.56 KB
/
docker-compose.dev.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
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
services:
db_postgres:
container_name: "db_boilerplate"
image: "postgres:12.6-alpine"
restart: on-failure
healthcheck:
test: "pg_isready -U walter -d postgres"
interval: 5s
timeout: 15s
retries: 5
env_file:
- .env
ports:
- "5433:5432"
command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"]
volumes:
- ./local-data/database/boilerplate:/var/lib/postgresql/data/
environment:
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
POSTGRES_PASSWORD: "white"
desci_blockchain_ganache:
container_name: "desci_blockchain_ganache"
build: ./desci-contracts
restart: on-failure
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:
- .env
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- ./local-data/ganache:/data
- ./desci-contracts/.openzeppelin:/app/.openzeppelin
depends_on:
graph_node:
condition: service_started
db_postgres:
condition: service_healthy
desci_nodes_backend:
container_name: "desci_nodes_backend"
entrypoint: /bin/sh './desci-server/scripts/be-node-dev.sh'
env_file:
- .env
ports:
- "5420:5420"
- "9228:9228"
- "9277:9277"
- "5555:5555"
extra_hosts:
- host.docker.internal:host-gateway
depends_on:
db_postgres:
condition: service_healthy
desci_blockchain_ganache:
condition: service_healthy
graph_node:
condition: service_started
redis:
condition: service_healthy
# - nodes_media # UNCOMMENT FOR LOCAL DEV OF nodes-media
links:
- db_postgres
volumes:
- ./local-data/yarn_cache:/root/.yarn
# mem_limit: 2g #uncomment to test large data with limited memory
block_explorer_dev:
image: sinaiman/expedition-dev:latest
container_name: "block_explorer"
ports:
- "3001:80"
graph_node:
image: graphprotocol/graph-node
container_name: "graph_node"
restart: on-failure
# healthcheck:
# test: "pg_isready -U walter -d postgres"
# interval: 5s
# timeout: 15s
# retries: 5
ports:
- "8000:8000"
- "8001:8001"
- "8020:8020"
- "8030:8030"
- "8040:8040"
extra_hosts:
- host.docker.internal:host-gateway
depends_on:
ipfs:
condition: service_healthy
db_postgres:
condition: service_healthy
environment:
# https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md
postgres_host: db_postgres
# postgres_port: 5433
postgres_user: walter
postgres_pass: white
postgres_db: postgres
ipfs: "host.docker.internal:5001"
ethereum: "ganache:http://host.docker.internal:8545"
# see levels here https://docs.rs/env_logger/0.6.0/env_logger/
GRAPH_LOG: info
RUST_BACKTRACE: 1
GRAPH_MAPPING_HANDLER_TIMEOUT: 10
# GRAPH_ETHEREUM_FETCH_TXN_RECEIPTS_IN_BATCHES: true
GRAPH_IPFS_TIMEOUT: 10
# ENABLE_GRAPHQL_VALIDATIONS: true
# GRAPH_QUERY_CACHE_BLOCKS: 0
# GRAPH_LOG_POI_EVENTS: true
# GRAPH_LOAD_THRESHOLD: 250
# EXPERIMENTAL_SUBGRAPH_VERSION_SWITCHING_MODE: synced
ipfs:
image: ipfs/kubo:v0.26.0
container_name: "ipfs"
environment:
IPFS_SWARM_KEY: "/key/swarm/psk/1.0.0/\n/base16/\n9d002c50635a479d29dcc0ccb49d862952a0dcc52baddd253167adcd496c8d04"
ports:
- "5001:5001"
- "8089: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/ipfs:/data/ipfs
healthcheck:
test: ipfs ls QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1
interval: 5s
retries: 5
start_period: 10s
timeout: 2s
ipfs_public:
image: ipfs/kubo:v0.26.0
container_name: "ipfs_public"
ports:
- "5002:5001"
- "8090: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/ipfs_public:/data/ipfs
healthcheck:
test: ipfs ls QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1
interval: 5s
retries: 5
start_period: 10s
timeout: 2s
redis:
image: "redis:7-alpine"
container_name: "redis_cache"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 1s
retries: 5
ports:
- "6379:6379"
volumes:
- ./local-data/redis:/data
ceramic:
image: ceramicnetwork/js-ceramic:6.5.0
container_name: ceramic
ports:
- "7007:7007"
- "9464:9464"
environment:
NODE_ENV: production
CERAMIC_PUBSUB_QPS_LIMIT: 500
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- ./local-data/ceramic/statestore:/root/.ceramic/statestore
- ./.ceramicDev.config.json:/root/.ceramic/daemon.config.json
healthcheck:
test:
[
"CMD",
"curl",
"--fail-with-body",
"http://localhost:7007/api/v0/node/healthcheck",
]
interval: 5s
timeout: 5s
retries: 5
depends_on:
ipfs:
condition: service_healthy
db_postgres:
condition: service_healthy
desci-media-isolated:
build:
context: ./desci-media-isolated
target: dev
container_name: "media_isolated"
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- ./desci-media-isolated:/usr/src/app
ports:
- "9777:9777" # debugger
- "7771:7771" # Uncomment if you want to test the media server from the host machine
environment:
DPID_RESOLVER_URL: http://host.docker.internal:5460
grobid:
image: lfoppiano/grobid:0.8.0
container_name: grobid
ports:
- "8070:8070"
environment:
- JAVA_OPTS=-Xmx2G -Xms2G
dpid_resolver:
image: descilabs/dpid-resolver:develop
container_name: dpid_resolver
# Uncomment and set to local repo path for tinkering
# build:
# context: ~/dev/desci/dpid-resolver
environment:
DPID_ENV: local
OPTIMISM_RPC_URL: http://host.docker.internal:8545
CERAMIC_URL: http://host.docker.internal:7007
IPFS_GATEWAY: http://host.docker.internal:8089/ipfs
REDIS_HOST: host.docker.internal
REDIS_PORT: 6379
# How long to store anchored commit info (default 24 hours)
CACHE_TTL_ANCHORED: 86400
# How long to store pending commit info
CACHE_TTL_PENDING: 300
restart: on-failure
ports:
- "5460:5460"
extra_hosts:
- host.docker.internal:host-gateway
healthcheck:
test: ["CMD", "curl", "--fail-with-body", "http://localhost:5460/healthz"]
interval: 5s
timeout: 5s
retries: 5
depends_on:
ipfs:
condition: service_healthy
desci_blockchain_ganache:
condition: service_healthy
ceramic:
condition: service_healthy
redis:
condition: service_healthy