-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.yml
235 lines (232 loc) · 6.16 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
version: '3'
services:
sublime_mantis:
image: sublimesec/mantis:1.56
restart: unless-stopped
container_name: sublime_mantis
environment:
POSTGRES_HOST: sublime_postgres
POSTGRES_USER: sublime
POSTGRES_DB: mantis
REDIS_HOST: sublime_redis
STRELKA_URL: sublime_strelka_frontend
SCREENSHOT_SERVICE_ENDPOINT: http://sublime_screenshot_service:8100/capture
SCREENSHOT_SERVICE_BUCKET: email-screenshots
S3_ENDPOINT: http://sublimes3:8110
USE_SELF_IMAGE_LINKS: "true"
AWS_REGION: us-east-1
HYDRA_URL: http://sublime_hydra:8200
DEPLOYMENT_INFRA_TYPE: "DOCKER_COMPOSE"
LOG_LEVEL: "WARN"
HYDRA_CLIENT_TIMEOUT_OVERRIDE_SEC: 30
PERSISTENT_STORAGE: /data/persistent_storage
env_file: sublime.env
ports:
- "0.0.0.0:8000:8000"
networks:
- net
depends_on:
- sublime_postgres
- sublime_strelka_backend
- sublime_strelka_frontend
volumes:
- persistent_storage:/data/persistent_storage
sublime_bora_lite:
image: sublimesec/bora-lite:1.56
restart: unless-stopped
container_name: sublime_bora_lite
environment:
POSTGRES_HOST: sublime_postgres
POSTGRES_USER: sublime
POSTGRES_DB: mantis
REDIS_HOST: sublime_redis
STRELKA_URL: sublime_strelka_frontend
SCREENSHOT_SERVICE_ENDPOINT: http://sublime_screenshot_service:8100/capture
SCREENSHOT_SERVICE_BUCKET: email-screenshots
S3_ENDPOINT: http://sublimes3:8110
AWS_REGION: us-east-1
HYDRA_URL: http://sublime_hydra:8200
DEPLOYMENT_INFRA_TYPE: "DOCKER_COMPOSE"
LOG_LEVEL: "WARN"
HYDRA_CLIENT_TIMEOUT_OVERRIDE_SEC: 30
PERSISTENT_STORAGE: /data/persistent_storage
env_file: sublime.env
networks:
- net
depends_on:
- sublime_mantis
- sublime_redis
- sublime_strelka_backend
- sublime_strelka_frontend
volumes:
- persistent_storage:/data/persistent_storage
sublime_postgres:
image: postgres:13.2
command: -c 'max_connections=200'
restart: unless-stopped
container_name: sublime_postgres
environment:
POSTGRES_USER: sublime
POSTGRES_DB: mantis
PGDATA: /data/postgres
env_file: sublime.env
volumes:
- postgres:/data/postgres
networks:
- net
sublime_dashboard:
image: sublimesec/dashboard:1.56
restart: unless-stopped
container_name: sublime_dashboard
ports:
- "0.0.0.0:3000:80"
networks:
- net
env_file: sublime.env
environment:
MANTIS_HOST_URL: "http://sublime_mantis:8000"
depends_on:
- sublime_mantis
sublime_redis:
image: redis:6.2
restart: unless-stopped
container_name: sublime_redis
command: redis-server --loglevel warning
networks:
- net
sublime_strelka_frontend:
image: sublimesec/strelka-frontend:0.3
restart: unless-stopped
command: strelka-frontend
networks:
- net
volumes:
- ./configs/frontend/:/etc/strelka/:ro
- logs:/var/log/strelka/
depends_on:
- sublime_strelka_coordinator
deploy:
replicas: 1
sublime_strelka_backend:
image: sublimesec/strelka-backend:0.3
restart: unless-stopped
command: strelka-backend
shm_size: 512mb
networks:
- net
volumes:
- ./configs/backend/:/etc/strelka/:ro
depends_on:
- sublime_strelka_coordinator
deploy:
replicas: 2
sublime_strelka_manager:
image: sublimesec/strelka-manager:0.3
restart: unless-stopped
command: strelka-manager
container_name: sublime_strelka_manager_1
networks:
- net
volumes:
- ./configs/manager/:/etc/strelka/:ro
depends_on:
- sublime_strelka_coordinator
sublime_strelka_coordinator:
image: redis:alpine
restart: unless-stopped
command: redis-server --save "" --appendonly no
container_name: sublime_strelka_coordinator_1
networks:
- net
sublime_screenshot_service:
image: sublimesec/render-email-html:0.2
restart: unless-stopped
environment:
- DISABLE_DD=true
container_name: sublime_screenshot_service
networks:
- net
# Keep this name as sublimes3 because underscores don't play nice with certain endpoint validation
sublimes3:
container_name: sublimes3
image: minio/minio
restart: unless-stopped
networks:
- net
volumes:
- s3_data:/data
env_file: sublime.env
entrypoint: >
/bin/sh -c "
export MINIO_ROOT_USER=$$AWS_ACCESS_KEY_ID;
export MINIO_ROOT_PASSWORD=$$AWS_SECRET_ACCESS_KEY;
minio server --address 0.0.0.0:8110 --console-address 0.0.0.0:8111 /data;
"
sublime_create_buckets:
image: minio/mc
depends_on:
- sublimes3
networks:
- net
env_file: sublime.env
entrypoint: >
/bin/sh -c "
sleep 15;
/usr/bin/mc config host add myminio http://sublimes3:8110 $$AWS_ACCESS_KEY_ID $$AWS_SECRET_ACCESS_KEY;
/usr/bin/mc mb myminio/email-screenshots;
/usr/bin/mc ls myminio;
exit 0;
"
sublime_hydra:
image: sublimesec/hydra-cpu:1.0
restart: unless-stopped
networks:
- net
container_name: sublime_hydra
environment:
WORKERS: 1
WEB_CONCURRENCY: 5
KEEP_ALIVE: 2
WORKER_TIMEOUT: 30
GRACEFUL_WORKER_TIMEOUT: 30
sublime_nginx_letsencrypt:
image: sublimesec/nginx-letsencrypt:latest
restart: unless-stopped
profiles:
- letsencrypt
ports:
- "80:80"
- "443:443"
depends_on:
- sublime_mantis
- sublime_dashboard
container_name: sublime_nginx_letsencrypt
env_file:
- "${LETSENCRYPT_ENV:-certbot.env.example}"
volumes:
- /etc/letsencrypt/:/etc/letsencrypt/
networks:
- net
sublime_nginx_custom_ssl:
image: sublime_nginx_custom_ssl:latest
restart: unless-stopped
profiles:
- nginx-custom-ssl
ports:
- "443:443"
depends_on:
- sublime_mantis
- sublime_dashboard
container_name: sublime_nginx_custom_ssl
volumes:
- /etc/nginx-custom-ssl/:/etc/nginx-custom-ssl/
networks:
- net
networks:
net:
driver: bridge
volumes:
postgres:
logs:
s3_data:
persistent_storage: