-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
272 lines (260 loc) · 6.74 KB
/
docker-compose.yaml
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
version: "3.9"
services:
cardano-node:
container_name: cardano-node
image: ghcr.io/blinklabs-io/cardano-node:${CARDANO_NODE_VERSION:-9.2.1}
environment:
- NETWORK=${NETWORK:-mainnet}
volumes:
- node-data:/data
- node-ipc:/ipc
- node-config:/opt/cardano/config
restart: on-failure
healthcheck:
test: ["CMD-SHELL", "curl -f 127.0.0.1:12798/metrics || exit 1"]
interval: 60s
timeout: 10s
retries: 5
ports:
- ${CARDANO_NODE_PORT:-3001}:3001
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
profiles:
- kupmios
- node
- node-api
- ogmios
- tx-submit-api
cardano-node-api:
container_name: cardano-node-api
image: ghcr.io/blinklabs-io/cardano-node-api:${CARDANO_NODE_API_VERSION:-0.4.0}
environment:
- CARDANO_NETWORK=${CARDANO_NETWORK:-mainnet}
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
depends_on:
cardano-node:
condition: service_healthy
volumes:
- node-ipc:/ipc
restart: on-failure
ports:
- ${CARDANO_NODE_API_API_LISTEN_PORT:-8080}:8080
- ${CARDANO_NODE_API_GRPC_LISTEN_PORT:-9090}:9090
- ${CARDANO_NODE_API_METRICS_LISTEN_PORT:-8081}:8081
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
profiles:
- node-api
bluefin:
image: ghcr.io/blinklabs-io/bluefin:${BLUEFIN_VERSION:-0.13.0}
container_name: bluefin
environment:
- NETWORK=${NETWORK:-mainnet}
- PROFILE=${PROFILE:-tuna-v2}
- MNEMONIC=${MNEMONIC}
- SUBMIT_URL=${SUBMIT_URL}
volumes:
- bluefin-data:/data
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
restart: on-failure
profiles:
- bluefin
bluefin-inspector:
image: busybox
container_name: bluefin-inspector
command: ["sh", "-c", "while true; do sleep 3600; done"]
volumes:
- bluefin-data:/data
restart: no
profiles:
- bluefin-inspector
bursa:
container_name: bursa
image: ghcr.io/blinklabs-io/bursa:${BURSA_VERSION:-0.8.3}
environment:
- NETWORK=${CARDANO_NETWORK:-mainnet}
restart: on-failure
command: ["api"]
ports:
- ${BURSA_API_LISTEN_PORT:-8090}:8080
- ${BURSA_METRICS_LISTEN_PORT:-8081}:8081
profiles:
- bursa
kupo:
container_name: kupo
image: cardanosolutions/kupo:${KUPO_VERSION:-v2.9.0}
environment:
- NETWORK=${CARDANO_NETWORK:-mainnet}
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
depends_on:
cardano-node:
condition: service_healthy
volumes:
- node-ipc:/ipc
- kupo-db:/db
- node-config:/config
restart: on-failure
command:
- --node-socket
- /ipc/node.socket
- --host
- 0.0.0.0
- --port
- '1442'
- --log-level
- Info
- --node-config
- /config/${NETWORK:-mainnet}/config.json
- --match
- '*'
- --defer-db-indexes
- --since
- origin
- --workdir
- '/db'
ports:
- "1442:1442"
profiles:
- kupmios
ogmios:
container_name: ogmios
image: cardanosolutions/ogmios:v${OGMIOS_VERSION:-6.8.0}
environment:
- NETWORK=${NETWORK:-mainnet}
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
depends_on:
cardano-node:
condition: service_healthy
volumes:
- node-ipc:/ipc
- node-config:/config
restart: on-failure
command: [
"--log-level", "info",
"--host", "0.0.0.0",
"--port", "1337",
"--node-socket", "/ipc/node.socket",
"--node-config", "/config/${NETWORK:-mainnet}/config.json"
]
ports:
- ${OGMIOS_PORT:-1337}:1337
healthcheck:
test: ["CMD-SHELL", "nc -z 127.0.0.1 1337 || exit 1"]
interval: 30s
timeout: 10s
retries: 15
start_period: 60s
profiles:
- kupmios
- ogmios
tx-submit-api:
container_name: tx-submit-api
image: ghcr.io/blinklabs-io/tx-submit-api:${TX_SUBMIT_API_VERSION:-0.20.0}
environment:
- NETWORK=${CARDANO_NETWORK:-mainnet}
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket
depends_on:
cardano-node:
condition: service_healthy
volumes:
- node-ipc:/ipc
restart: on-failure
ports:
- ${TX_SUBMIT_API_PORT:-8090}:8090
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
profiles:
- tx-submit-api
cardano-db-sync:
container_name: cardano-db-sync
image: ghcr.io/blinklabs-io/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.3.0.0}
environment:
- DISABLE_LEDGER=${DISABLE_LEDGER}
- NETWORK=${NETWORK:-mainnet}
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-}
- RESTORE_RECREATE_DB=N
- EXTRA_DB_SYNC_ARGS=${EXTRA_DB_SYNC_ARGS:-}
depends_on:
# Depend on both services to be healthy before starting.
cardano-node:
condition: service_healthy
postgres:
condition: service_healthy
secrets:
- postgres_password
- postgres_user
- postgres_db
volumes:
- db-sync-data:/var/lib/cexplorer
- node-ipc:/node-ipc
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
profiles:
- db-sync
postgres:
container_name: postgres
image: postgres:${POSTGRES_VERSION:-15.3-alpine3.18}
environment:
- POSTGRES_LOGGING=true
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- POSTGRES_USER_FILE=/run/secrets/postgres_user
secrets:
- postgres_password
- postgres_user
- postgres_db
ports:
- ${POSTGRES_PORT:-5432}:5432
volumes:
- postgres:/var/lib/postgresql/data
restart: on-failure
healthcheck:
# Use pg_isready to check postgres is running. Substitute different
# user `postgres` if you've setup differently to config/pgpass-mainnet
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
command: ${POSTGRES_ARGS:--c maintenance_work_mem=1GB -c max_parallel_maintenance_workers=4}
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
profiles:
- db-sync
secrets:
postgres_db:
file: ./postgres-config/secrets/postgres_db
postgres_password:
file: ./postgres-config/secrets/postgres_password
postgres_user:
file: ./postgres-config/secrets/postgres_user
volumes:
bluefin-data:
driver: local
db-sync-data:
kupo-db:
node-config:
node-data:
node-ipc:
postgres: