Deploy test / deploy (push) Successful in 1m34s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
36 lines
1.0 KiB
Nginx Configuration File
36 lines
1.0 KiB
Nginx Configuration File
server {
|
|
listen 8080;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Le worker de MapLibre est un module .mjs : le navigateur refuse tout autre type MIME.
|
|
include /etc/nginx/mime.types;
|
|
types {
|
|
text/javascript mjs;
|
|
}
|
|
|
|
# Le back-end tourne dans le même pod que ce conteneur.
|
|
location ~ ^/(api|admin|static)/ {
|
|
proxy_pass http://127.0.0.1:8000;
|
|
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 $http_x_forwarded_proto;
|
|
proxy_read_timeout 60s;
|
|
}
|
|
|
|
# Fichiers versionnés par Vite : cache long.
|
|
location /assets/ {
|
|
try_files $uri =404;
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
}
|
|
|
|
# Application monopage : toute autre route retombe sur index.html.
|
|
location / {
|
|
try_files $uri /index.html;
|
|
add_header Cache-Control "no-cache";
|
|
}
|
|
}
|