2020-11-28 01:22:25 +01:00
|
|
|
upstream network_inventory {
|
|
|
|
server backend:8000;
|
|
|
|
}
|
|
|
|
|
2020-11-27 19:57:03 +01:00
|
|
|
server {
|
2020-11-28 01:22:25 +01:00
|
|
|
listen 80;
|
2020-11-27 19:57:03 +01:00
|
|
|
|
2020-11-28 01:22:25 +01:00
|
|
|
location /api/ {
|
|
|
|
proxy_pass http://network_inventory;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_redirect off;
|
|
|
|
}
|
2020-11-27 19:57:03 +01:00
|
|
|
|
2020-11-28 01:22:25 +01:00
|
|
|
location /static/ {
|
|
|
|
alias /home/app/backend/static/;
|
|
|
|
}
|
2020-11-27 19:57:03 +01:00
|
|
|
|
2020-11-28 01:22:25 +01:00
|
|
|
location / {
|
|
|
|
root /usr/share/nginx/html/app/dist;
|
|
|
|
index index.html index.htm;
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
}
|
2020-11-27 19:57:03 +01:00
|
|
|
|
2020-11-28 01:22:25 +01:00
|
|
|
error_page 500 502 503 504 /50x.html;
|
2020-11-27 19:57:03 +01:00
|
|
|
|
2020-11-28 01:22:25 +01:00
|
|
|
location = /50x.html {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
}
|
2020-11-27 19:57:03 +01:00
|
|
|
}
|