Step 3 migration: frontend reads API with local fallback

This commit is contained in:
Ponte
2026-02-11 15:00:40 +01:00
parent 89d9275e1a
commit adc7ec193e
7 changed files with 177 additions and 2 deletions

25
nginx/default.conf Normal file
View File

@@ -0,0 +1,25 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location /api/ {
proxy_pass http://video-games-api:3001/api/;
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;
}
location = /health {
proxy_pass http://video-games-api:3001/health;
proxy_http_version 1.1;
}
location / {
try_files $uri $uri/ /index.html;
}
}