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

Fixes lost env vars for docker #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
15 changes: 15 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ if [ -z "${SUBSPACE_HTTP_INSECURE-}" ] ; then
export SUBSPACE_HTTP_INSECURE="false"
fi

if [ -z "${SUBSPACE_ALLOWED_IPS-}" ] ; then
export SUBSPACE_ALLOWED_IPS="0.0.0.0/0, ::/0"
fi

if [ -z "${SUBSPACE_ENDPOINT_HOST-}" ] ; then
export SUBSPACE_ENDPOINT_HOST="${SUBSPACE_HTTP_ADDR}"
fi

if [ -z "${SUBSPACE_LISTENPORT-}" ] ; then
export SUBSPACE_LISTENPORT="51820"
fi

export NAMESERVER="1.1.1.1"
export DEBIAN_FRONTEND="noninteractive"

Expand Down Expand Up @@ -159,6 +171,9 @@ if ! test -d /etc/sv/subspace ; then
mkdir /etc/sv/subspace
cat <<RUNIT >/etc/sv/subspace/run
#!/bin/sh
export SUBSPACE_ALLOWED_IPS="${SUBSPACE_ALLOWED_IPS}"
export SUBSPACE_ENDPOINT_HOST="${SUBSPACE_ENDPOINT_HOST}"
export SUBSPACE_LISTENPORT="${SUBSPACE_LISTENPORT}"
exec /usr/bin/subspace \
"--http-host=${SUBSPACE_HTTP_HOST}" \
"--http-addr=${SUBSPACE_HTTP_ADDR}" \
Expand Down