forked from input-output-hk/cardano-js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
168 lines (161 loc) · 4.2 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
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
version: "3.9"
services:
postgres:
image: postgres:${POSTGRES_VERSION:-11.5-alpine}
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
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
secrets:
- postgres_db
- postgres_password
- postgres_user
shm_size: '2gb'
volumes:
- postgres-data:/var/lib/postgresql/data
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
cardano-node-ogmios:
image: cardanosolutions/cardano-node-ogmios:${OGMIOS_VERSION:-v5.5.7}_${CARDANO_NODE_VERSION:-1.35.3}-${NETWORK:-mainnet}
healthcheck:
retries: 200
logging:
driver: "json-file"
options:
max-size: "400k"
max-file: "20"
ports:
- ${OGMIOS_PORT:-1337}:1337
restart: on-failure
volumes:
- ./config/network/${NETWORK:-mainnet}:/config
- node-db:/db
- node-ipc:/ipc
cardano-db-sync:
image: inputoutput/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.0.4}
command:
[
"--config",
"/config/cardano-db-sync/config.json",
"--socket-path",
"/node-ipc/node.socket"
]
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-}
- RESTORE_RECREATE_DB=N
depends_on:
cardano-node-ogmios:
condition: service_healthy
postgres:
condition: service_healthy
secrets:
- postgres_password
- postgres_user
- postgres_db
volumes:
- ./config/network/${NETWORK:-mainnet}:/config
- db-sync-data:/var/lib/cexplorer
- node-ipc:/node-ipc
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
rabbitmq:
image: rabbitmq:3.10-management
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
ports:
# HTTP management UI
- '15672:15672'
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
volumes:
- rabbitmq-db:/var/lib/rabbitmq/mnesia
http-server:
build:
args:
- NETWORK=${NETWORK:-mainnet}
context: ../../
target: http-server
depends_on:
cardano-node-ogmios:
condition: service_healthy
postgres:
condition: service_healthy
environment:
- EPOCH_POLL_INTERVAL=${EPOCH_POLL_INTERVAL:-10000}
- DB_CACHE_TTL=${DB_CACHE_TTL:-120}
- ENABLE_METRICS=${ENABLE_METRICS:-false}
- LOGGER_MIN_SEVERITY=${LOGGER_MIN_SEVERITY:-info}
- OGMIOS_URL=ws://cardano-node-ogmios:1337
- RABBITMQ_URL=amqp://rabbitmq:5672
- SERVICE_NAMES=${SERVICE_NAMES:-asset,chain-history,network-info,rewards,stake-pool,tx-submit,utxo}
- USE_QUEUE=${USE_QUEUE:-false}
ports:
- ${API_PORT:-4000}:3000
restart: on-failure
secrets:
- postgres_db
- postgres_password
- postgres_user
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
worker:
build:
context: ../../
target: worker
depends_on:
cardano-node-ogmios:
condition: service_healthy
rabbitmq:
condition: service_healthy
environment:
- LOGGER_MIN_SEVERITY=${LOGGER_MIN_SEVERITY:-info}
- OGMIOS_URL=ws://cardano-node-ogmios:1337
- PARALLEL=${PARALLEL:-false}
- PARALLEL_TX=${PARALLEL_TX:-3}
- POLLING_CYCLE=${POLLING_CYCLE:-500}
- RABBITMQ_URL=amqp://rabbitmq:5672
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
secrets:
postgres_db:
file: ./placeholder-secrets/postgres_db
postgres_password:
file: ./placeholder-secrets/postgres_password
postgres_user:
file: ./placeholder-secrets/postgres_user
volumes:
db-sync-data:
node-db:
node-ipc:
postgres-data:
rabbitmq-db: