diff --git a/nginx/Dockerfile b/nginx/Dockerfile index c234df1..2a9af73 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1,6 +1,13 @@ +FROM node:17-alpine AS less +RUN npm install less -g +ADD buscribe-web /assets +WORKDIR /assets +RUN lessc style.less > style.css + # nginx container contains config that exposes all the various services metrics FROM nginx:latest ADD nginx/generate-config / +COPY --from=less /assets /etc/nginx/html/buscribe COPY thrimbletrimmer /etc/nginx/html/thrimbletrimmer LABEL org.opencontainers.image.source https://github.com/dbvideostriketeam/wubloader ENTRYPOINT ["/bin/sh", "-c", "/generate-config && nginx -g \"daemon off;\""] diff --git a/nginx/generate-config b/nginx/generate-config index 4eb21bc..e83fd37 100755 --- a/nginx/generate-config +++ b/nginx/generate-config @@ -5,6 +5,7 @@ # Other vars: # THRIMBLETRIMMER: Set non-empty to also serve thrimbletrimmer on /thrimbletrimmer +# BUSCRIBE: Set non-empty to also serve buscribe on /buscribe # SEGMENTS: Set to path to segments dir to also serve segments dir on /segments # SSL: Set to path to file containing SSL cert and key, if any. @@ -26,6 +27,8 @@ LOCATIONS=$( [ -n "$THRIMBLETRIMMER" ] && echo -e "\t\tlocation = / { return 301 /thrimbletrimmer/; }" && echo -e "\t\tlocation /thrimbletrimmer { }" + [ -n "$BUSCRIBE" ] && + echo -e "\t\tlocation /buscribe { }" [ -n "$SEGMENTS" ] && echo -e "\t\tlocation /segments/ { alias $SEGMENTS/; }" )