NEtraAi / docker /nginx.conf
093xpku
Clean project layout deployment
9bc686b
Raw
History Blame Contribute Delete
1.51 kB
server {
listen 80;
server_name localhost;
# Increase body size limit for large enrollment image uploads
client_max_body_size 50M;
# Proxy API requests to backend
location /api {
proxy_pass http://backend:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
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_cache_bypass $http_upgrade;
}
# Proxy OpenAPI Documentation to backend
location /docs {
proxy_pass http://backend:8000/docs;
proxy_set_header Host $host;
}
location /openapi.json {
proxy_pass http://backend:8000/openapi.json;
proxy_set_header Host $host;
}
location /redoc {
proxy_pass http://backend:8000/redoc;
proxy_set_header Host $host;
}
# Proxy all other routes to Next.js frontend
location / {
proxy_pass http://frontend:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
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_cache_bypass $http_upgrade;
}
}