Add nginx.conf to docker-compose of control-panel 67/5467/1
authorRehanRaza <muhammad.rehan.raza@est.tech>
Tue, 19 Jan 2021 12:39:59 +0000 (13:39 +0100)
committerRehanRaza <muhammad.rehan.raza@est.tech>
Tue, 19 Jan 2021 12:41:58 +0000 (13:41 +0100)
The config file needs to be mounted to the frontend docker container in order to make the backend configurable.

Change-Id: I60dd041634bd707719fe2338a5c4c9d2b472693e
Issue-ID: NONRTRIC-400
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
docker-compose/control-panel/config/nginx.conf [new file with mode: 0644]
docker-compose/control-panel/docker-compose.yaml

diff --git a/docker-compose/control-panel/config/nginx.conf b/docker-compose/control-panel/config/nginx.conf
new file mode 100644 (file)
index 0000000..81102eb
--- /dev/null
@@ -0,0 +1,19 @@
+events{}
+
+http {
+    include /etc/nginx/mime.types;
+
+    upstream backend {
+        server  nonrtric-gateway:9090;
+    }
+
+    server {
+        listen 8080;
+        server_name localhost;
+        root /usr/share/nginx/html;
+        index index.html;
+        location /api/ {
+            proxy_pass  http://backend;
+        }
+    }
+}
\ No newline at end of file
index d50e76e..bc56c3d 100644 (file)
@@ -29,3 +29,5 @@ services:
     ports:
       - 8080:8080
       - 8082:8082
+    volumes:
+      - ./control-panel/config/nginx.conf:/etc/nginx/nginx.conf:ro