-
Notifications
You must be signed in to change notification settings - Fork 4
/
compose.yaml
241 lines (230 loc) · 5.38 KB
/
compose.yaml
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
services:
amass:
image: owaspamass/amass:latest
networks:
- amass
env_file:
- ./config/logs/syslog.env
volumes:
- ./config:/.config/amass:rw
- ./data/client:/data:rw
depends_on:
engine:
condition: service_healthy
syslog:
condition: service_healthy
viz:
image: owaspamass/amass:latest
networks:
- amass
env_file:
- ./config/logs/syslog.env
volumes:
- ./config:/.config/amass:rw
- ./data/viz:/data:rw
depends_on:
assetdb:
condition: service_healthy
syslog:
condition: service_healthy
entrypoint: /bin/viz
subs:
image: owaspamass/amass:latest
networks:
- amass
env_file:
- ./config/logs/syslog.env
volumes:
- ./config:/.config/amass:rw
- ./data/subs:/data:rw
depends_on:
assetdb:
condition: service_healthy
syslog:
condition: service_healthy
entrypoint: /bin/subs
assoc:
image: owaspamass/amass:latest
networks:
- amass
env_file:
- ./config/logs/syslog.env
volumes:
- ./config:/.config/amass:rw
- ./data/assoc:/data:rw
depends_on:
assetdb:
condition: service_healthy
syslog:
condition: service_healthy
entrypoint: /bin/assoc
track:
image: owaspamass/amass:latest
networks:
- amass
env_file:
- ./config/logs/syslog.env
volumes:
- ./config:/.config/amass:rw
- ./data/track:/data:rw
depends_on:
assetdb:
condition: service_healthy
syslog:
condition: service_healthy
entrypoint: /bin/track
engine:
image: owaspamass/amass:latest
container_name: engine
working_dir: /.config/amass
networks:
- amass
environment:
- POSTAL_SERVER_HOST=postal
- POSTAL_SERVER_PORT=8000
env_file:
- ./config/logs/syslog.env
volumes:
- ./data/engine:/.config/amass:rw
expose:
- "4000"
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 5
window: 360s
resources:
reservations:
memory: 1024M
depends_on:
assetdb:
condition: service_healthy
postal:
condition: service_healthy
syslog:
condition: service_healthy
grafana:
condition: service_healthy
healthcheck:
test: [ "CMD", "ae_isready", "--host", "127.0.0.1" ]
interval: 10s
timeout: 5s
retries: 25
entrypoint: /bin/engine
assetdb:
build: https://github.com/owasp-amass/asset-db.git#master
shm_size: '4gb'
container_name: assetdb
networks:
- amass
volumes:
- ./assetdb:/var/lib/postgresql/data:rw
environment:
- POSTGRES_USER=postgres
env_file:
- ./config/assetdb.env
configs:
- source: grafana_initdb
target: /usr/share/postgresql/2_grafanadb.sh
ports:
- "55432:5432"
deploy:
restart_policy:
condition: any
resources:
reservations:
memory: 512M
entrypoint:
- sh
- -euc
- |
cp /usr/share/postgresql/2_grafanadb.sh /docker-entrypoint-initdb.d/2_grafanadb.sh
chmod +x /docker-entrypoint-initdb.d/2_grafanadb.sh
/usr/local/bin/docker-entrypoint.sh postgres
postal:
image: ghcr.io/le0pard/postal_server:latest
container_name: postal
networks:
- amass
env_file:
- ./config/logs/syslog.env
expose:
- "8000"
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 5
window: 360s
resources:
reservations:
memory: 2048M
depends_on:
syslog:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "http://postal:8000/health" ]
interval: 3s
timeout: 2s
retries: 20
syslog:
image: lscr.io/linuxserver/syslog-ng:latest
container_name: syslog
networks:
- amass
environment:
- TZ=Etc/UTC
volumes:
- ./config/logs:/config:rw
- ./logs:/var/log:rw
expose:
- "5514/udp"
- "6601/tcp"
- "6514/tcp"
deploy:
restart_policy:
condition: any
healthcheck:
test: [ "CMD-SHELL", "exit 0" ]
interval: 5s
retries: 20
grafana:
image: grafana/grafana:latest
container_name: grafana
networks:
- amass
environment:
- GF_LOG_MODE=console
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_FEATURE_TOGGLES_ENABLE=transformationsVariableSupport
env_file:
- ./config/assetdb.env
- ./config/logs/syslog.env
configs:
- source: grafana_config
target: /etc/grafana/grafana.ini
volumes:
- ./config/grafana/provisioning:/etc/grafana/provisioning:ro
- ./config/grafana/dashboards:/var/lib/grafana/dashboards:ro
ports:
- "3000:3000"
depends_on:
assetdb:
condition: service_healthy
syslog:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --timeout=2 --tries=1 --spider http://grafana:3000/api/health || exit 1" ]
interval: 3s
timeout: 2s
retries: 20
networks:
amass:
driver: bridge
name: amass-net
configs:
grafana_config:
file: ./config/grafana/grafana.ini
grafana_initdb:
file: ./config/grafana/initdb_grafana.sh