chore(test): add support for passing custom domain and port to test script
This commit is contained in:
@@ -3,8 +3,14 @@
|
||||
# This script will make your local Owncast server available at a public URL.
|
||||
# It's particularly useful for testing on mobile devices or want to test
|
||||
# activitypub integration.
|
||||
# Pass a custom domain as an argument if you have previously set it up at
|
||||
# localhost.run. Otherwise, a random hostname will be generated.
|
||||
# DOMAIN=me.example.com ./test/test-local.sh
|
||||
# Pass a port number as an argument if you are running Owncast on a different port.
|
||||
# By default, it will use port 8080.
|
||||
# PORT=8080 ./test/test-local.sh
|
||||
|
||||
PORT=8080
|
||||
PORT="${PORT:=8080}"
|
||||
HOST="localhost"
|
||||
|
||||
# Using nc (netcat) to check if the port is open
|
||||
@@ -15,4 +21,11 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ssh -R 80:localhost:$PORT localhost.run
|
||||
if [ -n "$DOMAIN" ]; then
|
||||
echo "Attempting to use custom domain: $DOMAIN"
|
||||
ssh -R $DOMAIN:80:localhost:$PORT localhost.run
|
||||
|
||||
else
|
||||
echo "Using auto-generated hostname for tunnel."
|
||||
ssh -R 80:localhost:$PORT localhost.run
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user