From ff5442c869091362ea96f8bd99fe54702e901d98 Mon Sep 17 00:00:00 2001 From: Brian Long Date: Thu, 17 Dec 2020 16:32:32 -0500 Subject: [PATCH] added share to nginx --- docker-compose.yml | 2 +- nginx-ingress/entrypoint.sh | 4 ++++ nginx-ingress/nginx.conf | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9eb0a72..f9499b3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: proxy: build: ./nginx-ingress - image: local/nginx-ingress:acs + image: local/nginx-ingress:acs-share ports: - 8080:8080 depends_on: diff --git a/nginx-ingress/entrypoint.sh b/nginx-ingress/entrypoint.sh index 3dc2e8e..48f44e8 100644 --- a/nginx-ingress/entrypoint.sh +++ b/nginx-ingress/entrypoint.sh @@ -4,6 +4,10 @@ if [[ $ACS_PLATFORM_URL ]]; then sed -i s%http:\/\/platform:8080%"$ACS_PLATFORM_URL"%g /etc/nginx/nginx.conf fi +if [[ $ACS_SHARE_URL ]]; then + sed -i s%http:\/\/share:8080%"$ACS_SHARE_URL"%g /etc/nginx/nginx.conf +fi + if [[ $ACCESS_LOG ]]; then sed -i s%\#ENV_ACCESS_LOG%"access_log $ACCESS_LOG;"%g /etc/nginx/nginx.conf fi diff --git a/nginx-ingress/nginx.conf b/nginx-ingress/nginx.conf index 0bbab22..005cadc 100644 --- a/nginx-ingress/nginx.conf +++ b/nginx-ingress/nginx.conf @@ -47,5 +47,12 @@ http { # If using external proxy / load balancer (for initial redirect if no trailing slash) absolute_redirect off; } + + location /share/ { + proxy_pass http://share:8080; + + # If using external proxy / load balancer (for initial redirect if no trailing slash) + absolute_redirect off; + } } }