Fix the Nginx conf to start even when Upstream is unavailable
[portal/nonrtric-controlpanel.git] / webapp-frontend / nginx.conf
index 47d7b26..10f4582 100644 (file)
@@ -2,19 +2,22 @@ events{}
 
 http {
     include /etc/nginx/mime.types;
-
-    upstream backend {
-        # to be replaced with hostname:port of nonrtric-gateway once it gets ready
-        server  controlpanel-backend-container:8080;
-    }
-
+    
     server {
-        listen 7070;
+        listen 8080;
         server_name localhost;
         root /usr/share/nginx/html;
         index index.html;
-        location /api/ {
-            proxy_pass  http://backend;
+        location /a1-policy/ {
+            set $upstream http://nonrtric-gateway:9090;
+            proxy_pass  $upstream;
+        }
+        location /ei-producer/{
+            set $upstream http://nonrtric-gateway:9090;
+            proxy_pass  $upstream;
+        }
+        location / {
+            try_files $uri $uri/ /index.html;
         }
     }
 }
\ No newline at end of file