diff --git a/playground/frontend/Dockerfile b/playground/frontend/Dockerfile index e115215e1de0..91dc2c5c460b 100644 --- a/playground/frontend/Dockerfile +++ b/playground/frontend/Dockerfile @@ -36,3 +36,4 @@ FROM nginx:1.21.3 COPY --from=build /app/nginx_default.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/build/web/ /usr/share/nginx/html RUN cp /usr/share/nginx/html/assets/assets/* /usr/share/nginx/html/assets/ +RUN gzip -kr /usr/share/nginx/html/assets/* diff --git a/playground/frontend/nginx_default.conf b/playground/frontend/nginx_default.conf index ffb38cb6257b..ef54dedf0fee 100644 --- a/playground/frontend/nginx_default.conf +++ b/playground/frontend/nginx_default.conf @@ -20,11 +20,19 @@ server { listen 8080; server_name localhost; + root /usr/share/nginx/html; + + gzip_static on; + location / { - root /usr/share/nginx/html; - index index.html index.htm; + try_files $uri /index.html; } + location = /index.html { + expires 30s; + } + + error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html;