]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Alias subfolder hosting
authorBastien Wirtz <bastien.wirtz@gmail.com>
Sun, 20 Mar 2022 20:46:36 +0000 (21:46 +0100)
committerBastien Wirtz <bastien.wirtz@gmail.com>
Sat, 30 Apr 2022 08:46:00 +0000 (10:46 +0200)
Dockerfile
Dockerfile.arm32v7
Dockerfile.arm64v8
lighttpd.conf

index f24d7be48e24b2ab6f1ac39addf22c0e66adf289..ffe50c4f6e91fddd8e309f2922414870188863b5 100644 (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
 
index 2256d2a6efa27aa683b3d5e827d099e12ebc3833..01a21966f79561866c42544888aeee1d4e937ae9 100644 (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
 
index 7d772f030ca74ee6ec240cd15b277eacb3d02ab3..f9e66755049e8b9e07a7d002c638c608cd9729eb 100644 (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
 
index da72bf996b2727188691a58dd1304a43770bb001..04b0bedb637d3267899fe68fa0b9e5de8aa4e73b 100644 (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.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")
-