mirror of
https://github.com/dokku/dokku.git
synced 2026-05-18 05:05:46 +02:00
The bare `tls-internal` key previously returned the computed value, so external tooling could not tell whether the property had been set on the app or was merely defaulting to `false`. The property is now also configurable with `--global`, the report exposes `computed-tls-internal` and `global-tls-internal` keys alongside the bare raw key, and the deploy path honors the per-app value with a fallback to the global value before the built-in default. Closes #8625.
25 lines
754 B
Bash
Executable File
25 lines
754 B
Bash
Executable File
#!/usr/bin/env bash
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
source "$PLUGIN_AVAILABLE_PATH/caddy-vhosts/internal-functions"
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
trigger-caddy-vhosts-core-post-deploy() {
|
|
declare desc="caddy-vhosts core-post-deploy plugin trigger"
|
|
declare trigger="core-post-deploy"
|
|
declare APP="$1"
|
|
local tls_internal
|
|
|
|
if [[ "$(plugn trigger proxy-type "$APP")" != "caddy" ]]; then
|
|
return
|
|
fi
|
|
|
|
tls_internal="$(fn-caddy-computed-tls-internal "$APP")"
|
|
dokku_log_info1 "Routing app via caddy"
|
|
if [[ "$tls_internal" == "true" ]]; then
|
|
dokku_log_warn "Warning: using caddy's internal, locally-trusted CA to produce certificates for this site"
|
|
fi
|
|
}
|
|
|
|
trigger-caddy-vhosts-core-post-deploy "$@"
|