feat: expose network listeners to nginx templates for all process types

This change allows users to specify a custom nginx.conf.sigil that can expose non-web process types to the outside world in addition to the web process type.

Closes #3258
This commit is contained in:
Jose Diaz-Gonzalez
2020-03-11 12:34:29 -04:00
parent 7d59b45fdb
commit 38a13ecd39
13 changed files with 93 additions and 52 deletions

View File

@@ -902,10 +902,10 @@ internal_get_app_urls() {
echo "$(<"$DOKKU_ROOT/HOSTNAME"):$app_port (container)"
done
else
local DOKKU_APP_LISTENERS PORT
DOKKU_APP_LISTENERS="$(plugn trigger network-get-listeners "$APP" | xargs)"
for DOKKU_APP_LISTENER in $DOKKU_APP_LISTENERS; do
PORT="$(echo "$DOKKU_APP_LISTENER" | cut -d ':' -f2)"
local DOKKU_APP_WEB_LISTENERS PORT
DOKKU_APP_WEB_LISTENERS="$(plugn trigger network-get-listeners "$APP" "web" | xargs)"
for DOKKU_APP_WEB_LISTENER in $DOKKU_APP_WEB_LISTENERS; do
PORT="$(echo "$DOKKU_APP_WEB_LISTENER" | cut -d ':' -f2)"
echo "$SCHEME://$(<"$DOKKU_ROOT/HOSTNAME"):$PORT (container)"
done
shopt -u nullglob