From ae6badfc64318a10184dfa8e1e2f72bc36203417 Mon Sep 17 00:00:00 2001 From: fleischsalatinspace Date: Wed, 22 Sep 2021 17:45:23 +0200 Subject: [PATCH] Dockerfile: symlink nginx logs to stdout/stderr for supervisord logging --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index e149c2e..29689c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,9 @@ RUN composer install FROM trafex/alpine-nginx-php7:ba1dd422 RUN apk update && apk add --no-cache busybox-suid sudo php7-redis php7-pdo php7-pdo_mysql php7-fileinfo shadow gettext bash apache2-utils +# symlink nginx logs to stdout/stderr for supervisord +RUN ln -sf /dev/stdout /var/log/nginx/access.log \ + && ln -sf /dev/stderr /var/log/nginx/error.log COPY static/nginx/nginx.conf /etc/nginx/templateNginx.conf # we need to create sites_enabled directory in order for entrypoint.sh being able to copy file after envsubst