From 221822d52f4be72390c9f154d1f294a2e0eae5fc Mon Sep 17 00:00:00 2001 From: Florian Hillebrand Date: Sun, 7 May 2023 13:19:25 +0200 Subject: [PATCH] Adjust geoipupdate permissions on start. New versions of geoipupdate don't run as root anymore, change folder perms accordingly. --- data/Dockerfiles/parsedmarc-init/start.sh | 4 ++++ docker-compose.yml | 4 ++++ 2 files changed, 8 insertions(+) mode change 100644 => 100755 data/Dockerfiles/parsedmarc-init/start.sh diff --git a/data/Dockerfiles/parsedmarc-init/start.sh b/data/Dockerfiles/parsedmarc-init/start.sh old mode 100644 new mode 100755 index 2d8783a..19af654 --- a/data/Dockerfiles/parsedmarc-init/start.sh +++ b/data/Dockerfiles/parsedmarc-init/start.sh @@ -8,6 +8,10 @@ echo "Setting permissions..." chmod g+rwx -R /usr/share/elasticsearch/data/ chgrp 0 -R /usr/share/elasticsearch/data/ +echo "## GEOIPUPDATE" +echo "Setting permissions..." +chown 1000:1000 -R /usr/share/GeoIP/ + echo "## NGINX" echo "Checking nginx certs..." cd /etc/nginx/ssl/ diff --git a/docker-compose.yml b/docker-compose.yml index b064d2f..46f6497 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: - ./data/conf/parsedmarc/:/etc/parsedmarc/:rw - ./data/conf/nginx/ssl/:/etc/nginx/ssl/:rw - ./data/data/elasticsearch:/usr/share/elasticsearch/data/:rw + - ./data/data/geoipupdate/:/usr/share/GeoIP:z,rw networks: - parsedmarc-network healthcheck: @@ -89,6 +90,9 @@ services: restart: always volumes: - ./data/data/geoipupdate/:/usr/share/GeoIP:z,rw + depends_on: + parsedmarc-init: + condition: service_healthy nginx: image: nginx:alpine