mirror of
https://github.com/dokku/dokku.git
synced 2026-05-18 05:05:46 +02:00
Re-enabling vhost (via `proxy:enable`, `domains:enable`, or `domains:add` with no global VHOST) was leaving the app pinned to the random high port and the empty VHOST file from the previous disabled state, so the new catch-all vhost intercepted requests for the app's domain. The `domains-enable` trigger now restores default vhosts via `domains_enable`, and `pre-enable-vhost` clears any stored proxy ports so they can be recomputed to 80/443. Also fixes the netrc lookup in the `git:auth` test to read dokku's netrc file directly.
19 lines
426 B
Bash
Executable File
19 lines
426 B
Bash
Executable File
#!/usr/bin/env bash
|
|
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
trigger-domains-domains-enable() {
|
|
declare desc="enables domains for an app"
|
|
declare trigger="domains-enable"
|
|
declare APP="$1" RESTART_APP="$2"
|
|
|
|
if [[ "$RESTART_APP" == "true" ]]; then
|
|
domains_enable "$APP"
|
|
else
|
|
domains_enable "$APP" --no-restart
|
|
fi
|
|
}
|
|
|
|
trigger-domains-domains-enable "$@"
|