client/js/router.js: Reads <base> href tag

This commit is contained in:
Shyam Sunder
2018-07-24 19:53:29 -04:00
committed by Marcin Kurczewski
parent defada45ab
commit 565027269c
5 changed files with 68 additions and 19 deletions

View File

@ -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