-
Notifications
You must be signed in to change notification settings - Fork 6
/
compose.yaml
281 lines (269 loc) · 6.47 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
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
services:
amass:
build: https://github.com/owasp-amass/amass.git#develop
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:
build: https://github.com/owasp-amass/amass.git#develop
networks:
- amass
env_file:
- ./config/logs/syslog.env
volumes:
- ./config:/.config/amass:rw
- ./data/viz:/data:rw
depends_on:
assetdb:
condition: service_healthy
neo4j:
condition: service_healthy
syslog:
condition: service_healthy
entrypoint: /bin/viz
subs:
build: https://github.com/owasp-amass/amass.git#develop
networks:
- amass
env_file:
- ./config/logs/syslog.env
volumes:
- ./config:/.config/amass:rw
- ./data/subs:/data:rw
depends_on:
assetdb:
condition: service_healthy
neo4j:
condition: service_healthy
syslog:
condition: service_healthy
entrypoint: /bin/subs
assoc:
build: https://github.com/owasp-amass/amass.git#develop
networks:
- amass
env_file:
- ./config/logs/syslog.env
volumes:
- ./config:/.config/amass:rw
- ./data/assoc:/data:rw
depends_on:
assetdb:
condition: service_healthy
neo4j:
condition: service_healthy
syslog:
condition: service_healthy
entrypoint: /bin/assoc
track:
build: https://github.com/owasp-amass/amass.git#develop
networks:
- amass
env_file:
- ./config/logs/syslog.env
volumes:
- ./config:/.config/amass:rw
- ./data/track:/data:rw
depends_on:
assetdb:
condition: service_healthy
neo4j:
condition: service_healthy
syslog:
condition: service_healthy
entrypoint: /bin/track
engine:
build: https://github.com/owasp-amass/amass.git#develop
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
neo4j:
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: 5
entrypoint: /bin/engine
assetdb:
build: https://github.com/owasp-amass/asset-db.git#master
shm_size: '4gb'
container_name: assetdb
networks:
- amass
volumes:
- ./assetdb/postgres:/var/lib/postgresql/data:rw
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- AMASS_DB=${AMASS_DB}
- AMASS_USER=${AMASS_USER}
- AMASS_PASSWORD=${AMASS_PASSWORD}
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
neo4j:
image: neo4j:latest
container_name: neo4j
networks:
- amass
volumes:
- ./assetdb/neo4j:/data:rw
environment:
- NEO4J_AUTH=neo4j/${AMASS_PASSWORD}
# - NEO4J_server_memory_heap_initial__size=4G
- NEO4J_server_memory_heap_max__size=4G
ports:
- "7474:7474"
- "7687:7687"
deploy:
restart_policy:
condition: any
resources:
reservations:
memory: 2048M
healthcheck:
test: [ "CMD-SHELL", "exit 0" ]
interval: 10s
timeout: 5s
retries: 5
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: 10s
timeout: 5s
retries: 5
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: 10s
timeout: 5s
retries: 5
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/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
neo4j:
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: 10s
timeout: 5s
retries: 5
networks:
amass:
driver: bridge
name: amass-net
configs:
grafana_config:
file: ./config/grafana/grafana.ini
grafana_initdb:
file: ./config/grafana/initdb_grafana.sh