diff --git a/Dockerfile b/Dockerfile index 6ce35fc..98f7dd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +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