diff --git a/Dockerfile b/Dockerfile index f24d7be..ffe50c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 2256d2a..01a2196 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -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 diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index 7d772f0..f9e6675 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -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 diff --git a/lighttpd.conf b/lighttpd.conf index da72bf9..04b0bed 100644 --- a/lighttpd.conf +++ b/lighttpd.conf @@ -1,20 +1,10 @@ -# Minimal config by Kirmy34 - include "/etc/lighttpd/mime-types.conf" -server.port = 8080 - -server.username = "lighttpd" -server.groupname = "lighttpd" - -server.document-root = "/www" -server.pid-file = "/run/lighttpd.pid" - -server.indexfiles = ("index.php", "index.html", "index.htm", "default.htm") - +server.port = env.PORT +server.modules = ( "mod_alias" ) +server.username = env.USER +server.groupname = env.GROUP +server.document-root = "/www" +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") -