Spaces:
Running
Running
| worker_processes auto; | |
| pid /tmp/nginx.pid; | |
| error_log /tmp/nginx-error.log warn; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| access_log /tmp/nginx-access.log; | |
| client_max_body_size 10M; | |
| # FastAPI env server β /env/* | |
| upstream env_server { | |
| server 127.0.0.1:8000; | |
| } | |
| # Next.js EHR app β everything else | |
| upstream ehr_app { | |
| server 127.0.0.1:3000; | |
| } | |
| server { | |
| listen 7860; | |
| # ββ OpenEnv API endpoints ββ | |
| # /env/reset β FastAPI /reset | |
| # /env/step β FastAPI /step | |
| # /env/state β FastAPI /state | |
| # /env/healthz β FastAPI /healthz | |
| location /env/ { | |
| proxy_pass http://env_server/; | |
| 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; | |
| } | |
| # ββ EHR UI + API routes ββ | |
| location / { | |
| proxy_pass http://ehr_app; | |
| 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_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "upgrade"; | |
| } | |
| } | |
| } | |