Skip to content

Commit

Permalink
[local-preview] show DOMAIN in the output
Browse files Browse the repository at this point in the history
This PR updates the `local-preview` to printout
the Domain of the Gitpod Instance for users to
access.

Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
  • Loading branch information
Pothulapati authored and roboquat committed Jul 13, 2022
1 parent 0107eaf commit eefee55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions install/preview/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

set -e

# Set Domain to `127-0-0-1.nip.io` if not set
if [ -z "${DOMAIN}" ]; then
export DOMAIN="127-0-0-1.nip.io"
fi

if [ "$1" != "logging" ]; then
$0 logging 2>&1 | /prettylog
exit
Expand All @@ -26,11 +31,6 @@ if [ "${total_cores}" -lt "${REQUIRED_CORES}" ]; then
exit 1
fi

# Set Domain to `127-0-0-1.nip.io` if not set
if [ -z "${DOMAIN}" ]; then
DOMAIN="127-0-0-1.nip.io"
fi

echo "Gitpod Domain: $DOMAIN"

if [ -f /sys/fs/cgroup/cgroup.controllers ]; then
Expand Down
3 changes: 2 additions & 1 deletion install/preview/prettylog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package main
import (
"bufio"
"errors"
"fmt"
"io"
"os"
"strings"
Expand All @@ -24,7 +25,7 @@ var msgs = []struct {
{Msg: "downloading images", Success: "--output-split-files"},
{Msg: "preparing Gitpod preview installation", Success: "rm -rf /var/lib/rancher/k3s/server/manifests/gitpod"},
{Msg: "starting Gitpod", Success: "gitpod-telemetry-init"},
{Msg: "Gitpod is running"},
{Msg: fmt.Sprintf("Gitpod is running. Visit https://%s to access the dashboard", os.Getenv("DOMAIN"))},
}

func main() {
Expand Down

0 comments on commit eefee55

Please sign in to comment.