diff --git a/Dockerfile b/Dockerfile index c71e41d3..9d8e9d81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,8 @@ COPY ./requirements.txt /requirements.txt COPY ./entrypoint.sh /entrypoint.sh COPY ./supervisord.conf /etc/supervisord.conf COPY ./nginx.conf /etc/nginx/nginx.conf +# Generate a copy of the nginx config with IPv6 support. +RUN sed 's/listen 8000;/listen 8000; listen [::]:8000;/' /etc/nginx/nginx.conf > /etc/nginx/nginx.ipv6.conf WORKDIR /yamtrack diff --git a/supervisord.conf b/supervisord.conf index bb564d02..537506a8 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -3,7 +3,7 @@ nodaemon=true user=root [program:nginx] -command=nginx -g 'daemon off;' +command=sh -c 'if [ "${YAMTRACK_IPV6_ENABLED:-False}" = "True" ]; then CONF=/etc/nginx/nginx.ipv6.conf; else CONF=/etc/nginx/nginx.conf; fi; nginx -c $CONF -g "daemon off;"' user=root priority=1 stdout_logfile=/dev/stdout