From 8124fffde2723b4b253c1fbfb08ee59dd60aba41 Mon Sep 17 00:00:00 2001 From: FuzzyGrim Date: Mon, 24 Mar 2025 21:51:35 +0100 Subject: [PATCH] fix: streamline nginx directory creation and ownership settings in Dockerfile and entrypoint script --- Dockerfile | 4 +--- entrypoint.sh | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d6f361c8..6019414f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,9 +20,7 @@ RUN apk add --no-cache nginx shadow \ && useradd -U -M -s /bin/sh abc \ # Create required nginx directories and set permissions && mkdir -p /var/log/nginx \ - && mkdir -p /var/lib/nginx/body \ - && chown -R abc:abc /var/log/nginx \ - && chown -R abc:abc /var/lib/nginx + && mkdir -p /var/lib/nginx/body # Django app COPY src ./ diff --git a/entrypoint.sh b/entrypoint.sh index d1d481fd..9cd4a098 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -10,8 +10,10 @@ PGID=${PGID:-1000} groupmod -o -g "$PGID" abc usermod -o -u "$PUID" abc -chown -R abc:abc /yamtrack +chown abc:abc /yamtrack chown -R abc:abc db chown -R abc:abc staticfiles +chown -R abc:abc /var/log/nginx +chown -R abc:abc /var/lib/nginx exec /usr/local/bin/supervisord -c /etc/supervisord.conf \ No newline at end of file