From 565027269c124c2aa7f7045983a75a31a9242215 Mon Sep 17 00:00:00 2001 From: Shyam Sunder Date: Tue, 24 Jul 2018 19:53:29 -0400 Subject: client/js/router.js: Reads href tag --- client/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client/Dockerfile') diff --git a/client/Dockerfile b/client/Dockerfile index 49e0ab6..69555a4 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -8,9 +8,10 @@ COPY . ./ ARG BUILD_INFO="docker-latest" ARG CLIENT_BUILD_ARGS="" -RUN node build.js ${CLIENT_BUILD_ARGS} +RUN BASE_URL="__BASEURL__" node build.js ${CLIENT_BUILD_ARGS} -RUN find public/ -type f -size +5k -print0 | xargs -0 -- gzip -6 -k +RUN find public/ -name public/index.html -prune -o -type f -size +5k \ + -print0 | xargs -0 -- gzip -6 -k FROM nginx:alpine @@ -21,6 +22,7 @@ RUN \ echo "#!/bin/sh" >> /init && \ echo 'sed -i "s|__BACKEND__|${BACKEND_HOST}|" /etc/nginx/nginx.conf' \ >> /init && \ + echo 'sed -i "s|__BASEURL__|${BASE_URL:-/}|" /var/www/index.htm' >> /init && \ echo 'exec nginx -g "daemon off;"' >> /init && \ chmod a+x /init -- cgit v1.3