refactor: drop direct access to PORT files
This commit is contained in:
committed by
Michael Hobbs
parent
9ef7c385d4
commit
81ddef04ff
@@ -1040,9 +1040,11 @@ get_app_urls() {
|
|||||||
echo "$(< "$DOKKU_ROOT/HOSTNAME"):$app_port (container)"
|
echo "$(< "$DOKKU_ROOT/HOSTNAME"):$app_port (container)"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
shopt -s nullglob
|
local DOKKU_APP_LISTENERS PORT
|
||||||
for PORT_FILE in $DOKKU_ROOT/$APP/PORT.*; do
|
DOKKU_APP_LISTENERS="$(plugn trigger network-get-listeners "$APP" | xargs)"
|
||||||
echo "$SCHEME://$(< "$DOKKU_ROOT/HOSTNAME"):$(< "$PORT_FILE") (container)"
|
for DOKKU_APP_LISTENER in $DOKKU_APP_LISTENERS; do
|
||||||
|
PORT="$(echo "$DOKKU_APP_LISTENER" | cut -d ':' -f2)"
|
||||||
|
echo "$SCHEME://$(< "$DOKKU_ROOT/HOSTNAME"):$PORT (container)"
|
||||||
done
|
done
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user