aboutsummaryrefslogtreecommitdiffhomepage
path: root/nginx.conf
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-13 23:00:47 +0900
committernsfisis <nsfisis@gmail.com>2026-02-13 23:07:26 +0900
commit373dbf12f6797497656565e9baa7ac69e1f005f5 (patch)
treee57a4a0a348bbfdbfa0ecc494e6c28706fa0ea90 /nginx.conf
parent17cfaf8e3edccffb02217157d8d9cd126c7c0b89 (diff)
downloadphperkaigi-2026-albatross-373dbf12f6797497656565e9baa7ac69e1f005f5.tar.gz
phperkaigi-2026-albatross-373dbf12f6797497656565e9baa7ac69e1f005f5.tar.zst
phperkaigi-2026-albatross-373dbf12f6797497656565e9baa7ac69e1f005f5.zip
refactor(infra): serve frontend static files via nginx volume mount
Replace app-server proxy with direct static file serving from nginx. The frontend service builds assets into a shared volume, and the reverse-proxy serves them with SPA fallback via try_files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'nginx.conf')
-rw-r--r--nginx.conf10
1 files changed, 5 insertions, 5 deletions
diff --git a/nginx.conf b/nginx.conf
index e2a3dd3..11ac5ed 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -3,9 +3,13 @@ events {
}
http {
+ include mime.types;
+
server {
listen 80;
+ root /var/www;
+
location /iosdc-japan/2025/code-battle/files/ {
alias /var/www/files/;
}
@@ -27,11 +31,7 @@ http {
}
location /iosdc-japan/2025/code-battle/ {
- proxy_pass http://app-server;
- 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;
+ try_files $uri $uri/ /iosdc-japan/2025/code-battle/index.html;
}
}
}