Skip to content

Commit

Permalink
update pre-release action
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-ebp committed Feb 24, 2024
1 parent 8802a26 commit 4402370
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/client-asset-sg/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY --from=ui-builder /app/dist/apps/client-asset-sg .

# this nginx base image will parse the template and will move it to
# /etc/nginx/conf.d/default.conf before it starts nginx process
COPY container/nginx.conf /etc/nginx/templates/default.conf.template
COPY /apps/client-asset-sg/docker/nginx.conf /etc/nginx/templates/default.conf.template

HEALTHCHECK --interval=10s --timeout=5s --start-period=10s --retries=3 CMD wget localhost -q -O - > /dev/null 2>&1

Expand Down
46 changes: 46 additions & 0 deletions apps/client-asset-sg/docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
map $sent_http_content_type $expires {
default off;
text/html epoch; # means no cache, as it is not a static page
text/css max;
application/javascript max;
application/woff2 max;
application/octet-stream max;
image/svg+xml 30d;
application/wasm max;
}

gzip on;

gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;

server {
listen 80;
listen [::]:80;

add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
add_header 'Access-Control-Allow-Origin' '$http_origin';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,Authorization,User-Agent,User-Identifier,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
add_header 'Timing-Allow-Origin' '*';

root /usr/share/nginx/html;

location /robots.txt {
return 200 "User-agent: *\nDisallow: /\n";
}

location ~ /\. {
deny all;
}

location / {
expires $expires;
try_files $uri$args $uri$args/ /index.html;
}
}

0 comments on commit 4402370

Please sign in to comment.