Skip to content

Commit

Permalink
fix: generate gzipped Docker assets at runtime (via swagger-api#5219)
Browse files Browse the repository at this point in the history
  • Loading branch information
shockey authored Mar 5, 2019
1 parent b3a555f commit 604c7b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;'

0 comments on commit 604c7b4

Please sign in to comment.