base front production image on official nginx image

This commit is contained in:
Lukas
2022-02-25 20:32:10 +01:00
committed by GitHub
parent 3f3af9b957
commit f1cba60825
4 changed files with 59 additions and 27 deletions
+48
View File
@@ -0,0 +1,48 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
access_log off;
gzip on;
gzip_comp_level 6;
gzip_min_length 1000;
gzip_proxied any;
gzip_disable "msie6";
gzip_types
application/atom+xml
application/geo+json
application/javascript
application/x-javascript
application/json
application/ld+json
application/manifest+json
application/rdf+xml
application/rss+xml
application/xhtml+xml
application/xml
font/eot
font/otf
font/ttf
image/svg+xml
text/css
text/javascript
text/plain
text/xml;
# serve static assets (that have a cache busting hash) with an efficient cache policy
location /assets {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public";
}
location / {
root /usr/share/nginx/html;
index index.html;
}
location ~ ^/[@_]/ {
try_files $uri $uri/ /index.html;
}
}