Serve buscribe-web out of the main nginx container, like thrimbletrimmer

This involves, as part of the nginx build process, having a build container that runs less
in order to render the css before copying it over.
pull/414/head
Mike Lang 1 month ago
parent 2d40893825
commit 510af15418

@ -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 # nginx container contains config that exposes all the various services metrics
FROM nginx:latest FROM nginx:latest
ADD nginx/generate-config / ADD nginx/generate-config /
COPY --from=less /assets /etc/nginx/html/buscribe
COPY thrimbletrimmer /etc/nginx/html/thrimbletrimmer COPY thrimbletrimmer /etc/nginx/html/thrimbletrimmer
LABEL org.opencontainers.image.source https://github.com/dbvideostriketeam/wubloader LABEL org.opencontainers.image.source https://github.com/dbvideostriketeam/wubloader
ENTRYPOINT ["/bin/sh", "-c", "/generate-config && nginx -g \"daemon off;\""] ENTRYPOINT ["/bin/sh", "-c", "/generate-config && nginx -g \"daemon off;\""]

@ -5,6 +5,7 @@
# Other vars: # Other vars:
# THRIMBLETRIMMER: Set non-empty to also serve thrimbletrimmer on /thrimbletrimmer # 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 # 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. # SSL: Set to path to file containing SSL cert and key, if any.
@ -26,6 +27,8 @@ LOCATIONS=$(
[ -n "$THRIMBLETRIMMER" ] && [ -n "$THRIMBLETRIMMER" ] &&
echo -e "\t\tlocation = / { return 301 /thrimbletrimmer/; }" && echo -e "\t\tlocation = / { return 301 /thrimbletrimmer/; }" &&
echo -e "\t\tlocation /thrimbletrimmer { }" echo -e "\t\tlocation /thrimbletrimmer { }"
[ -n "$BUSCRIBE" ] &&
echo -e "\t\tlocation /buscribe { }"
[ -n "$SEGMENTS" ] && [ -n "$SEGMENTS" ] &&
echo -e "\t\tlocation /segments/ { alias $SEGMENTS/; }" echo -e "\t\tlocation /segments/ { alias $SEGMENTS/; }"
) )

Loading…
Cancel
Save