Nginx logs to stdout for Docker Alpine images

This commit is contained in:
Angristan 2018-03-11 21:06:14 +01:00
parent 39ee93925b
commit 017baf57d5
4 changed files with 14 additions and 4 deletions

View file

@ -37,7 +37,9 @@ RUN curl -L https://github.com/shaarli/Shaarli/archive/latest.tar.gz | tar xzf -
&& cd shaarli \
&& composer --prefer-dist --no-dev install \
&& rm -rf ~/.composer \
&& chown -R nginx:nginx .
&& chown -R nginx:nginx . \
&& ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
&& ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
VOLUME /var/www/shaarli/data

View file

@ -37,7 +37,9 @@ RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf -
&& cd shaarli \
&& composer --prefer-dist --no-dev install \
&& rm -rf ~/.composer \
&& chown -R nginx:nginx .
&& chown -R nginx:nginx . \
&& ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
&& ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
VOLUME /var/www/shaarli/data

View file

@ -42,7 +42,10 @@ RUN rm -rf /etc/php7/php-fpm.d/www.conf \
WORKDIR /var/www
COPY --from=composer /app/shaarli shaarli
RUN chown -R nginx:nginx .
RUN chown -R nginx:nginx . \
&& ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
&& ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
VOLUME /var/www/shaarli/data
EXPOSE 80

View file

@ -42,7 +42,10 @@ RUN rm -rf /etc/php7/php-fpm.d/www.conf \
WORKDIR /var/www
COPY --from=composer /app/shaarli shaarli
RUN chown -R nginx:nginx .
RUN chown -R nginx:nginx . \
&& ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
&& ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
VOLUME /var/www/shaarli/data
EXPOSE 80