-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdocker-compose-ram.yml
More file actions
339 lines (327 loc) · 8.76 KB
/
docker-compose-ram.yml
File metadata and controls
339 lines (327 loc) · 8.76 KB
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
version: "3.9"
services:
## Impact-Graph
# Multiple GraphQL API instances (for load balancing)
impact-graph-ql1:
container_name: impact-graph-ql1
image: ${IMPACT_GRAPH_IMAGE:-ghcr.io/giveth/impact-graph:staging}
command: npm run start:docker:server
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
environment:
- NODE_ENV=production
- ENVIRONMENT=staging
- REDIS_HOST=redis-all
- REDIS_PORT=6379
- LOG_PATH=/usr/src/app/logs/impact-graph-graphql-1.log
- ENABLE_GRAPHQL=true
- ENABLE_CRONJOBS=false
- HOST=0.0.0.0
- PORT=4000
restart: always
volumes:
- ./config/impact-graph:/usr/src/app/config:ro
- ./config/impact-graph:/usr/src/app/build/config:ro
- ./logs/impact-graph:/usr/src/app/logs:rw
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:4000/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
depends_on:
- redis-all
- auth
- notification-center
networks:
- giveth
impact-graph-ql2:
container_name: impact-graph-ql2
image: ${IMPACT_GRAPH_IMAGE:-ghcr.io/giveth/impact-graph:staging}
command: npm run production
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
environment:
- ENVIRONMENT=staging
- LOG_PATH=/usr/src/app/logs/impact-graph-graphql-2.log
- ENABLE_GRAPHQL=true
- ENABLE_CRONJOBS=false
- HOST=0.0.0.0
- PORT=4000
restart: always
volumes:
- ./config/impact-graph:/usr/src/app/config:ro
- ./config/impact-graph/production.env:/usr/src/app/build/config/production.env:ro
- ./logs/impact-graph:/usr/src/app/logs:rw
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:4000/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
depends_on:
- redis-all
- auth
- notification-center
networks:
- giveth
impact-graph-ql3:
container_name: impact-graph-ql3
image: ${IMPACT_GRAPH_IMAGE:-ghcr.io/giveth/impact-graph:staging}
command: npm run production
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
environment:
- ENVIRONMENT=staging
- LOG_PATH=/usr/src/app/logs/impact-graph-graphql-3.log
- ENABLE_GRAPHQL=true
- ENABLE_CRONJOBS=false
- HOST=0.0.0.0
- PORT=4000
restart: always
volumes:
- ./config/impact-graph:/usr/src/app/config:ro
- ./config/impact-graph/production.env:/usr/src/app/build/config/production.env:ro
- ./logs/impact-graph:/usr/src/app/logs:rw
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:4000/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
depends_on:
- redis-all
- auth
- notification-center
networks:
- giveth
impact-graph-ql4:
container_name: impact-graph-ql4
image: ${IMPACT_GRAPH_IMAGE:-ghcr.io/giveth/impact-graph:staging}
command: npm run production
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
environment:
- ENVIRONMENT=staging
- LOG_PATH=/usr/src/app/logs/impact-graph-graphql-4.log
- ENABLE_GRAPHQL=true
- ENABLE_CRONJOBS=false
- HOST=0.0.0.0
- PORT=4000
restart: always
volumes:
- ./config/impact-graph:/usr/src/app/config:ro
- ./config/impact-graph/production.env:/usr/src/app/build/config/production.env:ro
- ./logs/impact-graph:/usr/src/app/logs:rw
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:4000/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
depends_on:
- redis-all
- auth
- notification-center
networks:
- giveth
# Background jobs instance (dedicated for cronjobs only)
impact-graph-jobs:
container_name: impact-graph-jobs
image: ${IMPACT_GRAPH_IMAGE:-ghcr.io/giveth/impact-graph:staging}
command: npm run production
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
environment:
- NODE_ENV=production
- LOG_PATH=/usr/src/app/logs/impact-graph-jobs.log
- ENABLE_GRAPHQL=false
- ENABLE_CRONJOBS=true
- HOST=0.0.0.0
- PORT=4000
restart: always
volumes:
- ./config/impact-graph:/usr/src/app/config:ro
- ./config/impact-graph/production.env:/usr/src/app/build/config/production.env:ro
- ./logs/impact-graph:/usr/src/app/logs:rw
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:4000/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
depends_on:
- redis-all
networks:
- giveth
#Authentication Service
auth:
image: ghcr.io/giveth/siweauthmicroservice:staging
restart: unless-stopped
command: npm run start:server:staging
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
environment:
- NODE_ENV=staging
networks:
- giveth
volumes:
- ./config/auth:/usr/src/app/dist/config:ro
- ./config/auth:/usr/src/app/config:ro
- ./logs/auth:/usr/src/app/dist/logs:rw
depends_on:
- redis-all
#Notification-Center
notification-center:
image: ghcr.io/giveth/notification-center:staging
command: npm run start:server:staging
restart: unless-stopped
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
environment:
- NODE_ENV=staging
networks:
- giveth
volumes:
- ./config/notification-center:/usr/src/app/dist/config:ro
- ./config/notification-center:/usr/src/app/config:ro
- ./logs/notification-center:/usr/src/app/dist/logs:rw
depends_on:
- redis-all
# GivEconomy-Notification-Service
givEconomy-notification-service:
image: ghcr.io/giveth/giveconomy-notification-service:staging
command: npm run start:docker:server
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
environment:
- NODE_ENV=staging
restart: unless-stopped
volumes:
- ./config/giveconomy-notification-service:/usr/src/app/config:ro
- ./logs/giveconomy-notification-service:/usr/src/app/logs:rw
- ./data/giveconomy-notification-service:/usr/src/app/data:rw
networks:
- giveth
# REDIS
redis-all:
image: ghcr.io/giveth/giveth-redis:latest
container_name: redis-all
command: redis-server --requirepass ${REDIS_PASSWORD:-changeme123}
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
networks:
- giveth
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD:-changeme123}
restart: always
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Caddy
caddy:
image: ghcr.io/giveth/giveth-caddy:latest
container_name: caddy-reverse-proxy
restart: unless-stopped
init: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE # Required for binding to ports 80 and 443
networks:
- giveth
ports:
- 80:80
- 443:443
env_file:
- .env
environment:
IMPACT_GRAPH_URL: ${IMPACT_GRAPH_URL:-}
AUTH_SERVICE_URL: ${AUTH_SERVICE_URL:-}
NOTIFICATION_CENTER_URL: ${NOTIFICATION_CENTER_URL:-}
# APIGIV_URL = ${APIGIV_URL:-}
RESTRICTED_PATHS: ${RESTRICTED_PATHS:-}
IP_WHITELIST: ${IP_WHITELIST:-}
IG_WHITELIST_RATE_EVENTS: ${IG_WHITELIST_RATE_EVENTS:-}
IG_WHITELIST_RATE_INTERVAL: ${IG_WHITELIST_RATE_INTERVAL:-}
IG_PUBLIC_RATE_EVENTS: ${IG_PUBLIC_RATE_EVENTS:-}
IG_PUBLIC_RATE_INTERVAL: ${IG_PUBLIC_RATE_INTERVAL:-}
DOMAIN_WHITELIST: ${DOMAIN_WHITELIST:-}
volumes:
- caddy_data:/data
- caddy_config:/config
- ./packages/frontend/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./logs/caddy:/usr/src/app/:rw
depends_on:
- impact-graph-ql1
- impact-graph-ql2
- impact-graph-ql3
- impact-graph-ql4
- impact-graph-jobs
- auth
- notification-center
volumes:
redis-data:
caddy_data:
caddy_config:
networks:
giveth:
driver: bridge