From f224d8327a723c36d69bd0ad909cd02ea3d8c4d6 Mon Sep 17 00:00:00 2001 From: Ali Hussain Date: Wed, 23 Aug 2017 19:05:14 -0500 Subject: [PATCH] Add in a link For testing default to example.com --- Dockerfile | 1 + mysite.template | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 17b0ac9..b32b783 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,5 @@ COPY index.html /usr/share/nginx/html/ COPY mysite.template /etc/nginx/conf.d/ # Add a dummy test path to simplify local testing ENV SERVICE_PATH testpath +ENV LINK_SERVER_NAME www.example.com CMD /bin/bash -c "envsubst < /etc/nginx/conf.d/mysite.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" diff --git a/mysite.template b/mysite.template index aee9553..0a04d9a 100644 --- a/mysite.template +++ b/mysite.template @@ -13,6 +13,10 @@ server { index index.html index.htm; } + location /link/ { + proxy_pass http://${LINK_SERVER_NAME}/target-path; + } + #error_page 404 /404.html; # redirect server error pages to the static page /50x.html