This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
forked from safe-global/safe-infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
254 lines (227 loc) · 5.96 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
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
version: "3.8"
volumes:
nginx-shared-txs:
nginx-shared-txs-cypress:
nginx-shared-cfg:
x-healthcheck-db-template: &pghealthcheck
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 30s
retries: 3
x-healthcheck-redis-template: &redishealthcheck
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 30s
retries: 3
services:
# Common nginx and database
nginx:
image: nginx:alpine
ports:
- "${REVERSE_PROXY_PORT}:8000"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- nginx-shared-txs:/nginx-txs
- nginx-shared-cfg:/nginx-cfg
depends_on:
- txs-web
- txs-web-cypress
- cfg-web
- cgw-web
- events-web
txs-db:
image: postgres:14-alpine
command: -c 'max_connections=250'
environment:
POSTGRES_PASSWORD: postgres
volumes:
- ./data/txs-db:/var/lib/postgresql/data
<<: *pghealthcheck
cfg-db:
image: postgres:14-alpine
environment:
POSTGRES_PASSWORD: postgres
volumes:
- ./data/cfg-db:/var/lib/postgresql/data
<<: *pghealthcheck
events-db:
image: postgres:14-alpine
environment:
POSTGRES_PASSWORD: postgres
volumes:
- ./data/events-db:/var/lib/postgresql/data
<<: *pghealthcheck
# Safe Transaction Service
txs-redis:
image: redis:alpine
<<: *redishealthcheck
txs-redis-cypress:
image: redis:alpine
<<: *redishealthcheck
txs-rabbitmq:
image: rabbitmq:alpine
txs-rabbitmq-cypress:
image: rabbitmq:alpine
txs-web:
image: klaytn/safe-transaction-service:${TXS_VERSION}
env_file:
- container_env_files/txs.env
environment:
- ETHEREUM_NODE_URL=${RPC_NODE_URL}
depends_on:
txs-db:
condition: service_healthy
txs-redis:
condition: service_healthy
working_dir: /app
volumes:
- nginx-shared-txs:/nginx
command: docker/web/run_web.sh
txs-web-cypress:
image: klaytn/safe-transaction-service:${TXS_VERSION}
env_file:
- container_env_files/txs-cypress.env
environment:
- ETHEREUM_NODE_URL=${RPC_NODE_URL_CYPRESS}
depends_on:
txs-db-cypress:
condition: service_healthy
txs-redis-cypress:
condition: service_healthy
working_dir: /app
volumes:
- nginx-shared-txs:/nginx
command: docker/web/run_web.sh
txs-worker-indexer: &txs-worker
image: klaytn/safe-transaction-service:${TXS_VERSION}
env_file:
- container_env_files/txs.env
environment:
- ETHEREUM_NODE_URL=${RPC_NODE_URL}
- RUN_MIGRATIONS=1
- WORKER_QUEUES=default,indexing
depends_on:
txs-db:
condition: service_healthy
txs-redis:
condition: service_healthy
command: docker/web/celery/worker/run.sh
txs-worker-indexer-cypress: &txs-worker-cypress
image: klaytn/safe-transaction-service:${TXS_VERSION}
env_file:
- container_env_files/txs-cypress.env
environment:
- ETHEREUM_NODE_URL=${RPC_NODE_URL_CYPRESS}
- RUN_MIGRATIONS=1
- WORKER_QUEUES=default,indexing
depends_on:
txs-db-cypress:
condition: service_healthy
txs-redis-cypress:
condition: service_healthy
command: docker/web/celery/worker/run.sh
txs-worker-contracts-tokens:
<<: *txs-worker
environment:
- WORKER_QUEUES=contracts,tokens
- ETHEREUM_NODE_URL=${RPC_NODE_URL}
depends_on:
txs-db:
condition: service_healthy
txs-redis:
condition: service_healthy
txs-worker-contracts-tokens-cypress:
<<: *txs-worker-cypress
environment:
- WORKER_QUEUES=contracts,tokens
- ETHEREUM_NODE_URL=${RPC_NODE_URL_CYPRESS}
depends_on:
txs-db-cypress:
condition: service_healthy
txs-redis-cypress:
condition: service_healthy
txs-worker-notifications-webhooks:
<<: *txs-worker
environment:
- WORKER_QUEUES=notifications,webhooks
- ETHEREUM_NODE_URL=${RPC_NODE_URL}
depends_on:
txs-db:
condition: service_healthy
txs-redis:
condition: service_healthy
txs-worker-notifications-webhooks-cypress:
<<: *txs-worker-cypress
environment:
- WORKER_QUEUES=notifications,webhooks
- ETHEREUM_NODE_URL=${RPC_NODE_URL_CYPRESS}
depends_on:
txs-db-cypress:
condition: service_healthy
txs-redis-cypress:
condition: service_healthy
txs-scheduler:
<<: *txs-worker
depends_on:
txs-db:
condition: service_healthy
txs-redis:
condition: service_healthy
command: docker/web/celery/scheduler/run.sh
txs-scheduler-cypress:
<<: *txs-worker-cypress
depends_on:
txs-db-cypress:
condition: service_healthy
txs-redis-cypress:
condition: service_healthy
command: docker/web/celery/scheduler/run.sh
# Safe Config Service
cfg-web:
image: safeglobal/safe-config-service:${CFG_VERSION}
tty: true
volumes:
- nginx-shared-cfg:/nginx
env_file:
- container_env_files/cfg.env
depends_on:
cfg-db:
condition: service_healthy
# Safe Client Gateway
cgw-redis:
image: redis:alpine
<<: *redishealthcheck
cgw-web:
image: safeglobal/safe-client-gateway-nest:${CGW_VERSION}
env_file:
- container_env_files/cgw.env
depends_on:
cgw-redis:
condition: service_healthy
ui:
image: klaytn/safe-wallet-web:${UI_VERSION}
env_file:
- container_env_files/ui.env
depends_on:
- nginx
expose:
- 8080
general-rabbitmq:
image: rabbitmq:alpine
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 15s
timeout: 30s
retries: 3
start_period: 15s
events-web:
image: safeglobal/safe-events-service:${EVENTS_VERSION}
env_file:
- container_env_files/events.env
depends_on:
events-db:
condition: service_healthy
general-rabbitmq:
condition: service_healthy