-
Notifications
You must be signed in to change notification settings - Fork 80
/
docker-compose-single.yml
1620 lines (1558 loc) · 48.9 KB
/
docker-compose-single.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
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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
version: "3.3"
services:
certificates:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELK}
container_name: certificates
volumes:
- certs:/usr/share/elasticsearch/config/certs
- ./instances.yml:/usr/share/elasticsearch/config/certs/instances.yml
- certs:/target_ca_cert_dir
user: "0"
networks:
- s1em
command: >
bash -c '
if [ x${ELASTIC_PASSWORD} == x ]; then
echo "Set the ELASTIC_PASSWORD environment variable in the .env file";
exit 1;
elif [ x${KIBANA_PASSWORD} == x ]; then
echo "Set the KIBANA_PASSWORD environment variable in the .env file";
exit 1;
fi;
if [ ! -f certs/ca.zip ]; then
echo "Creating CA";
bin/elasticsearch-certutil ca --silent --pem -out config/certs/ca.zip;
unzip config/certs/ca.zip -d config/certs;
fi;
if [ ! -f certs/certs.zip ]; then
bin/elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --in config/certs/instances.yml --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key;
unzip config/certs/certs.zip -d config/certs;
fi;
echo "Setting file permissions"
chown -R 1000:0 config/certs;
find . -type d -exec chmod 755 \{\} \;;
find . -type f -exec chmod 644 \{\} \;;
cp config/certs/ca/ca.crt /target_ca_cert_dir/ ;
echo "All done!";'
traefik:
image: traefik:2.4
container_name: traefik
restart: always
hostname: ${HOSTNAME}
ports:
- "443:443"
volumes:
- ./traefik/userfile:/etc/traefik/userfile:ro
- ./traefik/traefik.toml:/etc/traefik/traefik.toml:ro
- ./traefik/dyn.toml:/etc/traefik/dyn.toml:ro
- /var/run/docker.sock:/var/run/docker.sock
- traefikdata:/tmp
- certs:/etc/ssl:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
labels:
- "traefik.enable=true"
networks:
- s1em
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELK}
container_name: es01
hostname: es01
restart: always
environment:
- node.name=es01
- cluster.name=s1em
- cluster.initial_master_nodes=es01
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
- "ES_JAVA_OPTS=-XmsRAM_MASTERg -XmxRAM_MASTERg"
- network.host=0.0.0.0
- bootstrap.memory_lock=true
- xpack.license.self_generated.type=basic
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=true
- xpack.security.http.ssl.key=$CERTS_DIR/es01/es01.key
- xpack.security.http.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt
- xpack.security.http.ssl.certificate=$CERTS_DIR/es01/es01.crt
- xpack.security.transport.ssl.enabled=true
- xpack.security.transport.ssl.verification_mode=certificate
- xpack.security.transport.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt
- xpack.security.transport.ssl.certificate=$CERTS_DIR/es01/es01.crt
- xpack.security.transport.ssl.key=$CERTS_DIR/es01/es01.key
volumes: ['data01:/usr/share/elasticsearch/data', 'certs:$CERTS_DIR:ro']
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
healthcheck:
test: curl --cacert $CERTS_DIR/ca/ca.crt -s https://localhost:9200 >/dev/null; if [[ $$? == 52 ]]; then echo 0; else echo 1; fi
interval: 30s
timeout: 10s
retries: 5
ulimits:
memlock:
soft: -1
hard: -1
filebeat:
image: docker.elastic.co/beats/filebeat:${ELK}
container_name: filebeat
hostname: filebeat
user: root
restart: always
depends_on:
- es01
volumes:
- /var/log:/var/log
- syslog-ng-data:/var/log/syslog-ng
- suricatadata:/var/log/suricata
- traefikdata:/var/log/traefik
- zeekdata:/var/log/bro/current
- certs:/usr/share/certificates:ro
- ./filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- ./filebeat/ilm.json:/usr/share/filebeat/ilm.json:ro
- ./filebeat/modules.d/system.yml:/usr/share/filebeat/modules.d/system.yml:ro
- ./filebeat/modules.d/suricata.yml:/usr/share/filebeat/modules.d/suricata.yml:ro
- ./filebeat/modules.d/threatintel.yml:/usr/share/filebeat/modules.d/threatintel.yml:ro
- ./filebeat/modules.d/traefik.yml:/usr/share/filebeat/modules.d/traefik.yml:ro
- ./filebeat/modules.d/zeek.yml:/usr/share/filebeat/modules.d/zeek.yml:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
kibana:
image: docker.elastic.co/kibana/kibana:${ELK}
container_name: kibana
hostname: kibana
restart: always
depends_on:
- es01
volumes:
- ./kibana/kibana.yml:/usr/share/kibana/config/kibana.yml:ro
- ./kibana/node.options:/usr/share/kibana/config/node.options:ro
- ./kibana/index:/usr/share/kibana/index:ro
- ./kibana/dashboard:/usr/share/kibana/dashboard:ro
- kibanadata:/usr/share/kibana/data
- certs:/usr/share/certificates:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
labels:
- "traefik.enable=true"
- "traefik.http.routers.kibana.rule=PathPrefix(`/kibana`)"
- "traefik.http.routers.kibana.entryPoints=secure"
- "traefik.http.routers.kibana.tls=true"
- "traefik.http.services.kibana.loadbalancer.server.scheme=https"
networks:
- s1em
auditbeat:
image: docker.elastic.co/beats/auditbeat:${ELK}
container_name: auditbeat
hostname: auditbeat
restart: always
user: root
command: auditbeat -e -strict.perms=false
cap_add:
- AUDIT_CONTROL
- AUDIT_READ
privileged: true
pid: host
depends_on:
- es01
volumes:
- ./auditbeat/auditbeat.yml:/usr/share/auditbeat/auditbeat.yml:ro
- ./auditbeat/ilm.json:/usr/share/auditbeat/ilm.json:ro
- /var/run/docker.sock:/var/run/docker.sock
- certs:/usr/share/certificates:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
heartbeat:
image: docker.elastic.co/beats/heartbeat:${ELK}
container_name: heartbeat
restart: always
hostname: heartbeat
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
- ./heartbeat/heartbeat.yml:/usr/share/heartbeat/heartbeat.yml:ro
- ./heartbeat/ilm.json:/usr/share/heartbeat/ilm.json:ro
- ./heartbeat/monitors.d:/usr/share/heartbeat/monitors.d:ro
- certs:/usr/share/certificates:ro
networks:
- s1em
metricbeat:
image: docker.elastic.co/beats/metricbeat:${ELK}
container_name: metricbeat
restart: always
depends_on:
- es01
hostname: ${HOSTNAME}
command: ["-system.hostfs=/hostfs", "-e"]
user: root
networks:
- s1em
volumes:
- ./metricbeat/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
- ./metricbeat/ilm.json:/usr/share/metricbeat/ilm.json:ro
- ./metricbeat/modules.d/docker.yml:/usr/share/metricbeat/modules.d/docker.yml:ro
- ./metricbeat/modules.d/redis.yml:/usr/share/metricbeat/modules.d/redis.yml:ro
- ./metricbeat/modules.d/rabbitmq.yml:/usr/share/metricbeat/modules.d/rabbitmq.yml:ro
- ./metricbeat/modules.d/elasticsearch-xpack.yml:/usr/share/metricbeat/modules.d/elasticsearch-xpack.yml:ro
- ./metricbeat/modules.d/kibana-xpack.yml:/usr/share/metricbeat/modules.d/kibana-xpack.yml:ro
- ./metricbeat/modules.d/logstash-xpack.yml:/usr/share/metricbeat/modules.d/logstash-xpack.yml:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
- /proc:/hostfs/proc:ro
- /:/hostfs:ro
- certs:/usr/share/certificates:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
logstash:
image: docker.elastic.co/logstash/logstash:${ELK}
container_name: logstash
hostname: logstash
restart: always
user: root
volumes:
- certs:/usr/share/certificates:ro
- zircolite:/usr/share/logstash/zircolite:rw
- ./logstash/config/pipelines.yml:/usr/share/logstash/config/pipelines.yml:ro
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
- ./logstash/config/jvm.options:/usr/share/logstash/config/jvm.options:ro
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro
- ./logstash/templates:/usr/share/logstash/templates:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
ports:
- "5044:5044"
fleet-server:
container_name: fleet-server
hostname: fleet-server
user: root
image: docker.elastic.co/beats/elastic-agent:${ELK}
environment:
- FLEET_SERVER_ENABLE=true
- FLEET_URL=https://${ADMINISTRATION_IP}:8220
- FLEET_ENROLLMENT_TOKEN=fleetenroll
- FLEET_CA=/usr/share/certificates/ca/ca.crt
- FLEET_SERVER_ELASTICSEARCH_HOST=https://es01:9200
- FLEET_SERVER_ELASTICSEARCH_CA=/usr/share/certificates/ca/ca.crt
- FLEET_SERVER_CERT=/usr/share/certificates/fleet-server/fleet-server.crt
- FLEET_SERVER_CERT_KEY=/usr/share/certificates/fleet-server/fleet-server.key
- FLEET_SERVER_SERVICE_TOKEN=fleettoken
- CERTIFICATE_AUTHORITIES=/usr/share/certificates/ca/ca.crt
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/usr/share/certificates:ro
- ./fleet/fleet.yml:/usr/share/elastic-agent/fleet.yml
ports:
- "8220:8220"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
syslog-ng:
image: balabit/syslog-ng:latest
container_name: syslog-ng
hostname: syslog-ng
restart: always
networks:
- s1em
ports:
- "514:514/udp"
volumes:
- syslog-ng-data:/var/log
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
suricata:
image: jasonish/suricata:6.0
command: -c /etc/suricata/suricata.yaml -i network_monitoring
container_name: suricata
hostname: suricata
network_mode: "host"
privileged: true
user: root
cap_add:
- NET_RAW
- NET_ADMIN
- SYS_NICE
restart: always
depends_on:
- filebeat
volumes:
- ./rules/suricata:/etc/suricata/rules
- ./suricata/suricata.yaml:/etc/suricata/suricata.yaml
- ./suricata/threshold.config:/etc/suricata/threshold.config
- upload:/pcap
- suricatadata:/var/log/suricata
- suricatapcap:/var/log/suricata/pcap
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
ulimits:
memlock:
soft: -1
hard: -1
file4thehive:
image: v1d1an/file4thehive:1.6
container_name: file4thehive
hostname: file4thehive
user: root
restart: always
volumes:
- zeekfiles:/file
environment:
- THE_HIVE_KEY=${THE_HIVE_KEY}
- THE_HIVE_HOST=${THE_HIVE_HOST}
- SOURCE=S1EM
- EXCLUDE=${EXCLUDE}
- MONITOR_FILE=${MONITOR_FILE}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
zeek:
image: blacktop/zeek:4.1-elastic
container_name: zeek
hostname: zeek
network_mode: "host"
privileged: true
cap_add:
- NET_RAW
- NET_ADMIN
- SYS_NICE
restart: always
command: -C -i af_packet::network_monitoring local
working_dir: /zeek
volumes:
- upload:/pcap
- zeekdata:/zeek
- zeekfiles:/zeek/extract_files
- ./zeek/config.zeek:/usr/local/zeek/share/zeek/site/file-extraction/config.zeek:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
replay:
image: v1d1an/replay:1.1
container_name: replay
hostname: replay
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
- ZIRCOLITE_USER=${ZIRCOLITE_USER}
- ZIRCOLITE_PASSWORD=${ZIRCOLITE_PASSWORD}
volumes:
- ./replay/replay.sh:/data/replay.sh
- zircolite:/evtx
- upload:/pcap
- /var/run/docker.sock:/var/run/docker.sock
networks:
- s1em
file-upload:
image: v1d1an/file-upload:1.1
container_name: file-upload
hostname: file-upload
restart: always
user: root
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
- upload:/var/www/upload/server/php/chroot/files
environment:
- SITE_NAME=Upload for PCAP
- SITE_USERNAME=upload
- SITE_PASSWORD=upload
- DESCRIPTION=Upload only PCAP file.
labels:
- "traefik.enable=true"
- "traefik.http.routers.upload.rule=PathPrefix(`/upload`)"
- "traefik.http.routers.upload.entryPoints=secure"
- "traefik.http.routers.upload.tls=true"
- "traefik.http.services.upload.loadbalancer.server.port=80"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.upload.middlewares=redirect-to-https"
- "traefik.http.middlewares.upload-stripprefix.stripprefix.prefixes=/upload"
- "traefik.http.routers.upload.middlewares=upload-stripprefix"
networks:
- s1em
zircolite-upload:
image: v1d1an/file-upload:1.1
container_name: zircolite-upload
hostname: zircolite-upload
restart: always
user: root
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
- zircolite:/var/www/upload/server/php/chroot/files
environment:
- SITE_NAME=Upload for Zircolite
- SITE_USERNAME=upload
- SITE_PASSWORD=upload
- DESCRIPTION=Upload only EVTX file or JSON file (Use template exportForELK.tmpl).
labels:
- "traefik.enable=true"
- "traefik.http.routers.zircolite.rule=PathPrefix(`/zircolite`)"
- "traefik.http.routers.zircolite.entryPoints=secure"
- "traefik.http.routers.zircolite.tls=true"
- "traefik.http.services.zircolite.loadbalancer.server.port=80"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.zircolite.middlewares=redirect-to-https"
- "traefik.http.middlewares.zircolite-stripprefix.stripprefix.prefixes=/zircolite"
- "traefik.http.routers.zircolite.middlewares=zircolite-stripprefix"
networks:
- s1em
cortex:
image: v1d1an/cortex:3.1.7-6
container_name: cortex
hostname: cortex
restart: always
volumes:
- ./cortex/application.conf:/etc/cortex/application.conf:ro
- ./cortex/MISP.json:/opt/Cortex-Analyzers/analyzers/MISP/MISP.json:ro
- ./cortex/OpenCTI_SearchObservables.json:/opt/Cortex-Analyzers/analyzers/OpenCTI/OpenCTI_SearchObservables.json:ro
- ./cortex/OTXQuery.json:/opt/Cortex-Analyzers/analyzers/OTXQuery/OTXQuery.json:ro
- ./cortex/Elasticsearch_IP.json:/opt/Cortex-Analyzers/analyzers/Elasticsearch/Elasticsearch_IP.json:ro
- ./cortex/Elasticsearch_Hash.json:/opt/Cortex-Analyzers/analyzers/Elasticsearch/Elasticsearch_Hash.json:ro
- ./cortex/Elasticsearch_Domain.json:/opt/Cortex-Analyzers/analyzers/Elasticsearch/Elasticsearch_Domain.json:ro
- ./cortex/Capa.json:/opt/Cortex-Analyzers/analyzers/Capa/Capa.json:ro
- ./cortex/Yara.json:/opt/Cortex-Analyzers/analyzers/Yara/Yara.json:ro
- ./cortex/Mwdb.json:/opt/Cortex-Analyzers/analyzers/Mwdb/mwdb.json:ro
- ./rules/yara:/opt/rules/yara:ro
- certs:/opt/cortex/certificates:ro
- ./cortex/cacerts:/usr/local/openjdk-8/jre/lib/security/cacerts
environment:
- JVM_OPTS="-XmsRAM_CORTEXG -XmxRAM_CORTEXG"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
depends_on:
- es01
labels:
- "traefik.enable=true"
- "traefik.http.routers.cortex.rule=PathPrefix(`/cortex`)"
- "traefik.http.routers.cortex.entryPoints=secure"
- "traefik.http.routers.cortex.tls=true"
networks:
- s1em
cassandra:
image: cassandra:3.11
container_name: cassandra
hostname: cassandra
restart: always
environment:
- MAX_HEAP_SIZE=1G
- HEAP_NEWSIZE=1G
- CASSANDRA_CLUSTER_NAME=thp
volumes:
- cassandra:/var/lib/cassandra/data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
healthcheck:
test: ["CMD-SHELL", "[ $$(nodetool statusgossip -Dcom.sun.jndi.rmiURLParsing=legacy) = running ]"]
interval: 30s
timeout: 10s
retries: 5
thehive:
image: thehiveproject/thehive4:latest
container_name: thehive
hostname: thehive
user: root
restart: always
depends_on:
- cassandra
- es01
labels:
- "traefik.enable=true"
- "traefik.http.routers.thehive.rule=PathPrefix(`/thehive`)"
- "traefik.http.routers.thehive.entryPoints=secure"
- "traefik.http.routers.thehive.tls=true"
volumes:
- ./thehive/application.conf:/etc/thehive/application.conf:ro
- thehivedata:/opt/data
environment:
- JVM_OPTS="-XmsRAM_THEHIVEG -XmxRAM_THEHIVEG"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
command: '--no-config --no-config-secret'
networks:
- s1em
elastalert:
image: jertel/elastalert-docker:latest
container_name: elastalert
hostname: elastalert
restart: always
depends_on:
- es01
volumes:
- ./elastalert/elastalert.yaml:/opt/config/elastalert_config.yaml:ro
- ./rules/elastalert:/opt/elastalert/rules:ro
- certs:/usr/share/certificates:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
redis:
image: redis:7
hostname: redis
container_name: redis
restart: always
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
volumes:
- redis:/data
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
db:
image: mysql:lts
container_name: db
hostname: db
command: --mysql-native-password=ON
restart: always
cap_add:
- SYS_NICE
environment:
- "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}"
volumes:
- ./mysql:/docker-entrypoint-initdb.d
- mysql:/var/lib/mysql
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
misp:
image: coolacid/misp-docker:core-latest
container_name: misp
hostname: misp
restart: always
depends_on:
- redis
- db
expose:
- "80"
- "443"
tmpfs:
- /tmp
labels:
- "traefik.enable=true"
- "traefik.http.routers.misp.rule=PathPrefix(`/misp`)"
- "traefik.http.routers.misp.entryPoints=secure"
- "traefik.http.routers.misp.tls=true"
- "traefik.http.middlewares.misp-stripprefix.stripprefix.prefixes=/misp/misp,/misp"
- "traefik.http.routers.misp.middlewares=misp-stripprefix"
environment:
- "HOSTNAME=https://${HOSTNAME}/misp"
- "REDIS_FQDN=redis"
- "INIT=true" # Initialze MISP, things includes, attempting to import SQL and the Files DIR
- "CRON_USER_ID=1" # The MISP user ID to run cron jobs as
- "NOREDIR=true"
- "DISIPV6=true" # Disable IPV6 in nginx
- "MYSQL_HOST=db"
- "MYSQL_USER=misp"
- "MYSQL_PASSWORD=misppass"
- "MYSQL_DATABASE=misp"
- "SECURESSL=false" # Enable higher security SSL in nginx
- "MISP_MODULES_FQDN=http://misp-modules" # Set the MISP Modules FQDN, used for Enrichment_services_url/Import_services_url/Export_services_url
- "WORKERS=4"
volumes:
- ./misp/config.php:/var/www/MISP/app/Config/config.php:rw
- misp:/var/www/MISP/app/tmp/logs
- misp:/var/www/MISP/app/files
- misp:/etc/nginx/certs
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
misp-modules:
image: coolacid/misp-docker:modules-latest
container_name: misp-modules
hostname: misp-modules
restart: always
environment:
- "REDIS_BACKEND=redis"
depends_on:
- redis
- db
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
mwdb:
image: certpl/mwdb:master
container_name: mwdb
hostname: mwdb
restart: always
env_file:
- mwdb/mwdb-vars.env
volumes:
- mwdb-uploads:/app/uploads
- ./mwdb/karton.ini:/etc/karton/karton.ini
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
depends_on:
- postgres
- redis
- minio
- karton-system
- karton-classifier
- karton-yaramatcher
- karton-asciimagic
- karton-mwdb-reporter
- karton-archive-extractor
environment:
UWSGI_PY_AUTORELOAD: 1
UWSGI_ENABLE_THREADS: 1
MWDB_ENABLE_KARTON: 1
MWDB_RECAPTCHA_SITE_KEY: "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"
MWDB_RECAPTCHA_SECRET: "6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe"
MWDB_ENABLE_OIDC: 1
MWDB_ENABLE_REGISTRATION: 1
networks:
- s1em
mwdb-web:
image: certpl/mwdb-web:master
container_name: mwdb-web
hostname: mwdb-web
restart: always
depends_on:
- mwdb
ports:
- 8080:80
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
postgres:
image: postgres:14
container_name: postgres
hostname: postgres
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- ./postgres:/docker-entrypoint-initdb.d
- mwdb-postgres:/var/lib/postgresql/data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
karton-system:
image: certpl/karton-system:master
container_name: karton-system
hostname: karton-system
depends_on:
- redis
- minio
volumes:
- "./mwdb/karton.ini:/etc/karton/karton.ini"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
entrypoint: karton-system
command: --setup-bucket
restart: always
networks:
- s1em
karton-classifier:
image: certpl/karton-classifier
container_name: karton-classifier
hostname: karton-classifier
depends_on:
- redis
- minio
volumes:
- "./mwdb/karton.ini:/etc/karton/karton.ini"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
- s1em
karton-yaramatcher:
image: certpl/karton-yaramatcher
container_name: karton-yaramatcher
hostname: karton-yaramatcher
command: karton-yaramatcher --rules /rules
depends_on:
- redis
- minio
volumes:
- "./mwdb/karton.ini:/etc/karton/karton.ini"
- ./rules/yara:/rules
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
- s1em
karton-asciimagic:
image: certpl/karton-asciimagic
container_name: karton-asciimagic
hostname: karton-asciimagic
depends_on:
- redis
- minio
volumes:
- "./mwdb/karton.ini:/etc/karton/karton.ini"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
- s1em
karton-archive-extractor:
image: certpl/karton-archive-extractor
container_name: karton-archive-extractor
hostname: karton-archive-extractor
depends_on:
- redis
- minio
volumes:
- "./mwdb/karton.ini:/etc/karton/karton.ini"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
- s1em
karton-mwdb-reporter:
image: certpl/karton-mwdb-reporter
container_name: karton-mwdb-reporter
hostname: karton-mwdb-reporter
depends_on:
- redis
- minio
volumes:
- "./mwdb/karton.ini:/etc/karton/karton.ini"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
- s1em
minio:
image: minio/minio:latest
container_name: minio
hostname: minio
volumes:
- minio:/data
environment:
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
- s1em
rabbitmq:
image: rabbitmq:management
container_name: rabbitmq
hostname: rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
volumes:
- amqpdata:/var/lib/rabbitmq
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
networks:
- s1em
opencti:
image: opencti/platform:latest
container_name: opencti
hostname: opencti
environment:
- NODE_OPTIONS=--max-old-space-size=8096
- APP__PORT=8080
- APP__ADMIN__EMAIL=${OPENCTI_ADMIN_EMAIL}
- APP__ADMIN__PASSWORD=${OPENCTI_ADMIN_PASSWORD}
- APP__ADMIN__TOKEN=${OPENCTI_ADMIN_TOKEN}
- APP__LOGS_LEVEL=error
- APP__LOGS=./logs
- APP__REACTIVE=true
- APP__BASE_PATH=/opencti
- REDIS__HOSTNAME=redis
- REDIS__PORT=6379
- ELASTICSEARCH__URL=["https://es01:9200"]
- ELASTICSEARCH__USERNAME=elastic
- ELASTICSEARCH__PASSWORD=${ELASTIC_PASSWORD}
- ELASTICSEARCH__SSL__CA=/usr/share/certificates/ca/ca.crt
- ELASTICSEARCH__SSL__KEY=/usr/share/certificates/opencti/opencti.key
- ELASTICSEARCH__SSL__CERT=/usr/share/certificates/opencti/opencti.crt
- ELASTICSEARCH__SSL__REJECT_UNAUTHORIZED=false
- ELASTICSEARCH__NUMBER_OF_REPLICAS=0
- MINIO__ENDPOINT=minio
- MINIO__PORT=9000
- MINIO__USE_SSL=false
- MINIO__ACCESS_KEY=${MINIO_ACCESS_KEY}
- MINIO__SECRET_KEY=${MINIO_SECRET_KEY}
- RABBITMQ__HOSTNAME=rabbitmq
- RABBITMQ__PORT=5672
- RABBITMQ__PORT_MANAGEMENT=15672
- RABBITMQ__MANAGEMENT_SSL=false
- RABBITMQ__USERNAME=${RABBITMQ_DEFAULT_USER}
- RABBITMQ__PASSWORD=${RABBITMQ_DEFAULT_PASS}
- PROVIDERS__LOCAL__STRATEGY=LocalStrategy
labels:
- "traefik.enable=true"
- "traefik.http.routers.opencti.rule=PathPrefix(`/opencti`)"
- "traefik.http.routers.opencti.entryPoints=secure"
- "traefik.http.routers.opencti.tls=true"
expose:
- "8080"
depends_on:
- redis
- es01
- minio
- rabbitmq
- worker
- connector-cve
- connector-export-file-csv
- connector-export-file-stix
- connector-import-document
- connector-import-file-stix
- connector-misp
- connector-mitre
- connector-alienvault
- connector-opencti
- connector-mwdb
- connector-disarm-framework
restart: always
volumes:
- certs:/usr/share/certificates:ro
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
worker:
image: opencti/worker:latest
container_name: worker
hostname: worker
environment:
- OPENCTI_URL=http://opencti:8080/opencti
- OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN}
- WORKER_LOG_LEVEL=info
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- s1em
connector-export-file-stix:
image: opencti/connector-export-file-stix:latest
container_name: connector-export-file-stix
hostname: connector-export-file-stix
environment: