refactor: only extract the nginx.conf.sigil from the source code and not an app path
The previous method was a bit more difficult for users to interact with as they needed to ensure the file was at a certain path in the built image. This change divorces the file from the built artifact, better aligning the nginx.conf.sigil handling with the rest of Dokku's monorepo support. A side effect of this is now building proxy configurations does not require access to the built image. Closes #5207
This commit is contained in:
@@ -24,6 +24,28 @@ fn-nginx-hsts-is-enabled() {
|
||||
echo "$hsts_is_enabled"
|
||||
}
|
||||
|
||||
fn-nginx-computed-nginx-conf-sigil-path() {
|
||||
declare APP="$1"
|
||||
local conf_sigil_path="$(fn-nginx-nginx-conf-sigil-path "$APP")"
|
||||
|
||||
if [[ "$conf_sigil_path" == "" ]]; then
|
||||
conf_sigil_path="$(fn-nginx-global-nginx-conf-sigil-path)"
|
||||
fi
|
||||
|
||||
echo "$conf_sigil_path"
|
||||
}
|
||||
|
||||
fn-nginx-global-nginx-conf-sigil-path() {
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-get-default "nginx" "--global" "nginx-conf-sigil-path" "nginx.conf.sigil"
|
||||
}
|
||||
|
||||
fn-nginx-nginx-conf-sigil-path() {
|
||||
declare APP="$1"
|
||||
fn-plugin-property-get-default "nginx" "$APP" "nginx-conf-sigil-path" ""
|
||||
}
|
||||
|
||||
fn-nginx-vhosts-manage-hsts() {
|
||||
declare APP="$1" SSL_ENABLED="$2"
|
||||
local HSTS="$(fn-nginx-hsts-is-enabled "$APP")"
|
||||
|
||||
Reference in New Issue
Block a user