Spaces:
Building
Building
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /usr/share/nginx/html; | |
| index index.html; | |
| # Fichiers statiques | |
| location / { | |
| try_files $uri $uri/ /index.html; | |
| } | |
| # Proxy vers l'API backend | |
| location /predict { | |
| proxy_pass http://api:8000/predict; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_read_timeout 120s; | |
| } | |
| location /analyze/ { | |
| proxy_pass http://api:8000/analyze/; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_read_timeout 120s; | |
| } | |
| location /health { | |
| proxy_pass http://api:8000/health; | |
| } | |
| } |