Spaces:
Sleeping
Sleeping
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include /etc/nginx/mime.types; | |
| default_type application/octet-stream; | |
| server { | |
| listen 7860; | |
| server_name localhost; | |
| root /app/frontend; | |
| index index.html; | |
| client_max_body_size 10m; | |
| location /api/ { | |
| proxy_pass http://127.0.0.1:4000; | |
| 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; | |
| proxy_read_timeout 60s; | |
| } | |
| location /ml-health { | |
| proxy_pass http://127.0.0.1:8000/api/v1/health; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host $host; | |
| } | |
| location /ml-predict { | |
| proxy_pass http://127.0.0.1:8000/api/v1/predict; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host $host; | |
| proxy_set_header Content-Type application/json; | |
| proxy_read_timeout 120s; | |
| } | |
| location / { | |
| try_files $uri $uri/ /index.html; | |
| } | |
| } | |
| } | |