fix: allow disabling IPv6

This commit is contained in:
thomas 2023-09-08 01:44:07 -04:00 committed by Bastien Wirtz
parent a3c5b4ac9d
commit ce2d3e945a
4 changed files with 10 additions and 1 deletions

View File

@ -24,6 +24,7 @@ RUN addgroup -S lighttpd -g ${GID} && adduser -D -S -u ${UID} lighttpd lighttpd
WORKDIR /www
COPY lighttpd.conf /lighttpd.conf
COPY ipv6.sh /etc/lighttpd/ipv6.sh
COPY entrypoint.sh /entrypoint.sh
COPY --from=build-stage --chown=${UID}:${GID} /app/dist /www/
COPY --from=build-stage --chown=${UID}:${GID} /app/dist/assets /www/default-assets

View File

@ -97,6 +97,8 @@ If you would like to host Homer in a subfolder, (ex: *http://my-domain/**homer**
* **`PORT`** (default: `8080`)
If you would like to change internal port of Homer from default `8080` to your port choice.
* **`IPV6_DISABLE`** (default: null)
Set to a non-empty value to disable listening on IPv6.
#### With docker-compose

6
ipv6.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# Enable IPV6 if needed
if test -z "$IPV6_DISABLE"; then
echo '$SERVER["socket"] == "[::]:" + env.PORT { }'
fi

View File

@ -1,7 +1,7 @@
include "/etc/lighttpd/mime-types.conf"
include_shell "/etc/lighttpd/ipv6.sh"
server.port = env.PORT
$SERVER["socket"] == "[::]:" + env.PORT { }
server.modules = ( "mod_alias" )
server.username = "lighttpd"
server.groupname = "lighttpd"