Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow disabling IPv6 #696

Merged
merged 5 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
tnyeanderson marked this conversation as resolved.
Show resolved Hide resolved
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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions ipv6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

# Enable IPV6 if needed
if test -z "$IPV6_DISABLE"; then
tnyeanderson marked this conversation as resolved.
Show resolved Hide resolved
echo '$SERVER["socket"] == "[::]:" + env.PORT { }'
fi
2 changes: 1 addition & 1 deletion lighttpd.conf
Original file line number Diff line number Diff line change
@@ -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"
Expand Down