fix(deploy): add nginx healthcheck and ensure nginx listens on all interfaces
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 0.0.0.0:80 default_server;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_types text/plain text/css application/json application/javascript image/svg+xml;
|
||||
|
||||
# Fingerprinted build assets can be cached forever
|
||||
location /assets/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# SPA fallback: let React Router handle client-side routes
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user