Alias subfolder hosting

This commit is contained in:
Bastien Wirtz 2022-03-20 21:46:36 +01:00
parent b6b31e440c
commit cd75da69f9
4 changed files with 16 additions and 23 deletions

View File

@ -17,15 +17,16 @@ ENV GROUP lighttpd
ENV GID 911
ENV UID 911
ENV PORT 8080
ENV SUBFOLDER "/_"
RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
apk add -U --no-cache lighttpd
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
COPY entrypoint.sh /entrypoint.sh
COPY lighttpd.conf /lighttpd.conf
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1

View File

@ -26,16 +26,17 @@ ENV GROUP lighttpd
ENV GID 911
ENV UID 911
ENV PORT 8080
ENV SUBFOLDER "/_"
RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
apk add -U --no-cache lighttpd && \
rm /usr/bin/qemu-arm-static
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
COPY entrypoint.sh /entrypoint.sh
COPY lighttpd.conf /lighttpd.conf
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1

View File

@ -26,16 +26,17 @@ ENV GROUP lighttpd
ENV GID 911
ENV UID 911
ENV PORT 8080
ENV SUBFOLDER "/_"
RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
apk add -U --no-cache lighttpd && \
rm /usr/bin/qemu-aarch64-static
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
COPY entrypoint.sh /entrypoint.sh
COPY lighttpd.conf /lighttpd.conf
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1

View File

@ -1,20 +1,10 @@
# Minimal config by Kirmy34
include "/etc/lighttpd/mime-types.conf"
server.port = 8080
server.username = "lighttpd"
server.groupname = "lighttpd"
server.port = env.PORT
server.modules = ( "mod_alias" )
server.username = env.USER
server.groupname = env.GROUP
server.document-root = "/www"
server.pid-file = "/run/lighttpd.pid"
server.indexfiles = ("index.php", "index.html", "index.htm", "default.htm")
alias.url = ( env.SUBFOLDER => "/www" )
server.indexfiles = ("index.html")
server.follow-symlink = "enable"
static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi")
url.access-deny = ("~", ".inc")