Redirect NGINX logs to stdout/stderr for Docker to collect

This commit is contained in:
Luca 2020-09-20 01:07:04 +02:00
parent 52d346a66e
commit 046dd4b32d
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
FROM alpine:3.12 FROM alpine:3.12
RUN apk add --no-cache nginx nginx-mod-rtmp && mkdir -p /etc/nginx/streams.d RUN apk add --no-cache nginx nginx-mod-rtmp; \
mkdir -p /etc/nginx/streams.d; \
ln -sf /dev/stdout /var/log/nginx/access.log; \
ln -sf /dev/stderr /var/log/nginx/error.log
COPY docker-entrypoint.sh / COPY docker-entrypoint.sh /
COPY rtmp.conf /etc/nginx/modules/ COPY rtmp.conf /etc/nginx/modules/