fix: generate gzipped Docker assets at runtime (via #5219)

This commit is contained in:
kyle
2019-03-05 15:49:45 -08:00
committed by GitHub
parent b3a555f589
commit 604c7b420f
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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;'