diff --git a/Dockerfile b/Dockerfile index f1b08544c70..39ee8e2b927 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,6 @@ COPY ./dist/* /usr/share/nginx/html/ COPY ./docker/run.sh /usr/share/nginx/ COPY ./docker/configurator /usr/share/nginx/configurator -RUN find /usr/share/nginx/html/ -type f -regex ".*\.\(html\|js\|css\)" -exec sh -c "gzip < {} > {}.gz" \; - RUN chmod +x /usr/share/nginx/run.sh EXPOSE 8080 diff --git a/docker/run.sh b/docker/run.sh index 959b02d6cf6..a5a9064134a 100644 --- a/docker/run.sh +++ b/docker/run.sh @@ -41,4 +41,6 @@ if [[ -n "${PORT}" ]]; then sed -i "s|8080|${PORT}|g" /etc/nginx/nginx.conf fi +find $NGINX_ROOT -type f -regex ".*\.\(html\|js\|css\)" -exec sh -c "gzip < {} > {}.gz" \; + exec nginx -g 'daemon off;'