Skip to content

Commit 6f87f09

Browse files
committed
- updated docker-compose.yml version
- make everything in a group network - let parsedmarc wait elasticserach by healthcheck - assign simpler container name
1 parent 671b16a commit 6f87f09

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

docker-compose.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,49 @@
1-
version: '3.5'
1+
version: '3.8'
22
services:
33
parsedmarc:
4+
container_name: parsedmarc
45
build: ./parsedmarc/
56
volumes:
67
- ./files:/input:ro
78
- ./output_files:/output
89
command: parsedmarc -c /parsedmarc.ini /input/* --debug
910
depends_on:
10-
- elasticsearch
11+
elasticsearch:
12+
condition: service_healthy
1113
restart: on-failure
14+
networks:
15+
- dmarc_visualizer_network
1216

1317
elasticsearch:
18+
container_name: elasticsearch
1419
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.5
20+
ports:
21+
- 9200:9200
1522
environment:
1623
- discovery.type=single-node
17-
volumes:
18-
- ./elastic_data:/usr/share/elasticsearch/data
24+
# not mounting the volume for now, as mounting Windows host folder to Linux container causes permission issues on elasticsearch (You may need to write a Dockerfile and customize owners/permissions of this folder.)
25+
# volumes:
26+
# - ./elastic_data:/usr/share/elasticsearch/data
27+
healthcheck:
28+
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
29+
interval: 30s
30+
timeout: 10s
31+
retries: 5
32+
start_period: 40s
33+
networks:
34+
- dmarc_visualizer_network
1935

2036
grafana:
37+
container_name: grafana
2138
build: ./grafana/
2239
ports:
2340
- 3000:3000
2441
user: root
2542
environment:
2643
GF_INSTALL_PLUGINS: grafana-piechart-panel,grafana-worldmap-panel
2744
GF_AUTH_ANONYMOUS_ENABLED: 'true'
45+
networks:
46+
- dmarc_visualizer_network
47+
48+
networks:
49+
dmarc_visualizer_network:

0 commit comments

Comments
 (0)