Skip to content

Commit

Permalink
Allow custom domain
Browse files Browse the repository at this point in the history
  • Loading branch information
csweichel committed Jun 7, 2022
1 parent 3dfbe2b commit b13331f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

set -eux -o pipefile
set -ex -o pipefail

# check for minimum requirements
REQUIRED_MEM_KB=$((6 * 1024 * 1024))
Expand All @@ -18,9 +18,11 @@ if [ $total_cores -lt $((REQUIRED_CORES)) ]; then
fi

# Get container's IP address
NODE_IP=$(hostname -i)
DOMAIN_STRING=${NODE_IP//[.]/-}
DOMAIN="${DOMAIN_STRING}.nip.io"
if [ -z "${DOMAIN}" ]; then
NODE_IP=$(hostname -i)
DOMAIN_STRING=${NODE_IP//[.]/-}
DOMAIN="${DOMAIN_STRING}.nip.io"
fi

echo "Gitpod Domain: $DOMAIN"

Expand All @@ -37,7 +39,7 @@ fi

mount --make-shared /sys/fs/cgroup
mount --make-shared /proc
mount --make-shared /var/gitpod
mount --make-shared /var/gitpod/workspaces

mkcert -install
# install in local store
Expand Down

0 comments on commit b13331f

Please sign in to comment.