From b0b6dc060f4927c904dc6c716d1bc533d9c64c0b Mon Sep 17 00:00:00 2001 From: Lathish Date: Thu, 11 Feb 2021 11:03:34 +0000 Subject: [PATCH] Update the Readme file Fix the Nginx conf to start even when upstream is unavailable Issue-ID: NONRTRIC-367 Change-Id: I01fc1b6d855b1c5e20f34e1045e9d5c18c11bfb9 Signed-off-by: Lathish --- docker-compose/README.md | 4 ++++ docker-compose/control-panel/config/nginx.conf | 14 ++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docker-compose/README.md b/docker-compose/README.md index d2f25c28..e4051316 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -14,6 +14,10 @@ limitations under the License. For more information about license please see the [LICENSE](LICENSE.txt) file for details. +## O-RAN-SC ControlPanel Gateway: +To view the policy or enrichment information in control panel gui along with Policy Management Service & Enrichment Coordinator Service you should also have nonrtric gateway because all the request from the gui is passed through this API gateway. +To start all the necessary components, +docker-compose -f docker-compose.yaml -f control-panel/docker-compose.yaml -f nonrtric-gateway/docker-compose.yaml -f policy-service/docker-compose.yaml -f ecs/docker-compose.yaml -f a1-sim/docker-compose.yaml up ## O-RAN-SC docker-compose files: The docker compose file helps the user to deploy all or partial components of nonrtric with one command. diff --git a/docker-compose/control-panel/config/nginx.conf b/docker-compose/control-panel/config/nginx.conf index bf12f872..10f45824 100644 --- a/docker-compose/control-panel/config/nginx.conf +++ b/docker-compose/control-panel/config/nginx.conf @@ -2,21 +2,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 /a1-policy/ { - proxy_pass http://backend; + set $upstream http://nonrtric-gateway:9090; + proxy_pass $upstream; } - location /ei-producer/ { - proxy_pass http://backend; + location /ei-producer/{ + set $upstream http://nonrtric-gateway:9090; + proxy_pass $upstream; } location / { try_files $uri $uri/ /index.html; -- 2.16.6