forked from safe-global/safe-infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
183 lines (163 loc) · 4.07 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
version: "3.8"
volumes:
nginx-shared-txs:
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
- 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-rabbitmq:
image: rabbitmq:alpine
txs-web:
image: safeglobal/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-worker-indexer: &txs-worker
image: safeglobal/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-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-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-scheduler:
<<: *txs-worker
depends_on:
txs-db:
condition: service_healthy
txs-redis:
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: safeglobal/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