diff options
author | thomas <me@thomasanderson.cloud> | 2023-09-08 01:44:07 -0400 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2023-10-21 05:16:20 -0700 |
commit | ce2d3e945a906e56ef43ef29d329a9f39314fcef (patch) | |
tree | 49f2a557fe5ead1df49e6baacd33343d01c05341 | |
parent | a3c5b4ac9dd1ddf2b52fff48ea860c067fb05cf9 (diff) | |
download | homer-ce2d3e945a906e56ef43ef29d329a9f39314fcef.tar.gz homer-ce2d3e945a906e56ef43ef29d329a9f39314fcef.tar.zst homer-ce2d3e945a906e56ef43ef29d329a9f39314fcef.zip |
fix: allow disabling IPv6
-rw-r--r-- | Dockerfile | 1 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | ipv6.sh | 6 | ||||
-rw-r--r-- | lighttpd.conf | 2 |
4 files changed, 10 insertions, 1 deletions
@@ -24,6 +24,7 @@ RUN addgroup -S lighttpd -g ${GID} && adduser -D -S -u ${UID} lighttpd lighttpd | |||
24 | WORKDIR /www | 24 | WORKDIR /www |
25 | 25 | ||
26 | COPY lighttpd.conf /lighttpd.conf | 26 | COPY lighttpd.conf /lighttpd.conf |
27 | COPY ipv6.sh /etc/lighttpd/ipv6.sh | ||
27 | COPY entrypoint.sh /entrypoint.sh | 28 | COPY entrypoint.sh /entrypoint.sh |
28 | COPY --from=build-stage --chown=${UID}:${GID} /app/dist /www/ | 29 | COPY --from=build-stage --chown=${UID}:${GID} /app/dist /www/ |
29 | COPY --from=build-stage --chown=${UID}:${GID} /app/dist/assets /www/default-assets | 30 | COPY --from=build-stage --chown=${UID}:${GID} /app/dist/assets /www/default-assets |
@@ -97,6 +97,8 @@ If you would like to host Homer in a subfolder, (ex: *http://my-domain/**homer** | |||
97 | * **`PORT`** (default: `8080`) | 97 | * **`PORT`** (default: `8080`) |
98 | If you would like to change internal port of Homer from default `8080` to your port choice. | 98 | If you would like to change internal port of Homer from default `8080` to your port choice. |
99 | 99 | ||
100 | * **`IPV6_DISABLE`** (default: null) | ||
101 | Set to a non-empty value to disable listening on IPv6. | ||
100 | 102 | ||
101 | #### With docker-compose | 103 | #### With docker-compose |
102 | 104 | ||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Enable IPV6 if needed | ||
4 | if test -z "$IPV6_DISABLE"; then | ||
5 | echo '$SERVER["socket"] == "[::]:" + env.PORT { }' | ||
6 | fi | ||
diff --git a/lighttpd.conf b/lighttpd.conf index 2bf043f..a6e9ff5 100644 --- a/lighttpd.conf +++ b/lighttpd.conf | |||
@@ -1,7 +1,7 @@ | |||
1 | include "/etc/lighttpd/mime-types.conf" | 1 | include "/etc/lighttpd/mime-types.conf" |
2 | include_shell "/etc/lighttpd/ipv6.sh" | ||
2 | 3 | ||
3 | server.port = env.PORT | 4 | server.port = env.PORT |
4 | $SERVER["socket"] == "[::]:" + env.PORT { } | ||
5 | server.modules = ( "mod_alias" ) | 5 | server.modules = ( "mod_alias" ) |
6 | server.username = "lighttpd" | 6 | server.username = "lighttpd" |
7 | server.groupname = "lighttpd" | 7 | server.groupname = "lighttpd" |