This commit is contained in:
admin
2026-01-22 21:05:48 +09:00
parent 3d91356877
commit 536266d70b
11 changed files with 236 additions and 85 deletions

38
docker/nginx/default.conf Normal file
View File

@@ -0,0 +1,38 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Serve static files
location / {
try_files $uri $uri/ =404;
}
# Proxy API requests to backend container
location /payroll/ {
proxy_pass http://backend:18080/payroll/;
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 /payroll/employees/ {
proxy_pass http://backend:18080/payroll/employees/;
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;
}
# Generic fallback to backend for other API paths
location /api/ {
proxy_pass http://backend:18080/;
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;
}
}