Initial
This commit is contained in:
commit
97dc0a3570
78 files changed
+7054
No files matched your search
@@ -0,0 +1,33 @@
|
||||
# Serves the built SPA and proxies /api to the backend in the same container.
|
||||
# Rendered by the nginx image's envsubst step into /etc/nginx/conf.d/default.conf.
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# The SPA handles the API itself; don't announce the server version.
|
||||
server_tokens off;
|
||||
|
||||
# SPA fallback: unknown paths render the app, so client-side routes like
|
||||
# /rooms/daily-standup work on refresh and deep links.
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-store";
|
||||
}
|
||||
|
||||
# Proxy the API to the Go backend running alongside nginx.
|
||||
location /api/ {
|
||||
proxy_pass http://${BACKEND_HOST}:${BACKEND_PORT};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user