Files
vigilcare-records/vigilcare-records-web/nginx.conf
T
voltsrage c871dc4842
CI / backend (push) Failing after 2m26s
CI / frontend (push) Failing after 53s
Add deployment files
2026-08-11 20:17:53 +08:00

37 lines
1.2 KiB
Nginx Configuration File

# Serves the built Vue SPA and reverse-proxies API/FHIR calls to the api
# container so the frontend's relative-URL Axios clients (baseURL "/api/v1" and
# "/fhir") work unmodified in production — mirrors the Vite dev server proxy in
# vite.config.ts, just pointed at the "api" service name instead of localhost.
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 30m; # scanned document uploads (25 MB max) plus overhead
location /api/ {
proxy_pass http://api:8080;
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 /fhir/ {
proxy_pass http://api:8080;
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;
}
# SPA history-mode fallback
location / {
try_files $uri $uri/ /index.html;
}
}