feat: migrate existing installs to new monorepo setup for nginx.conf.sigil file
This commit is contained in:
@@ -29,6 +29,25 @@ fn-nginx-vhosts-migrate-env-vars() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn-nginx-vhosts-migrate-nginx-conf-sigil() {
|
||||||
|
if [[ "$(fn-plugin-property-get-default "nginx" "--global" "nginx-conf-sigil-migrated" "")" == "true" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
fn-plugin-property-write "nginx" "--global" "nginx-conf-sigil-migrated" "true"
|
||||||
|
|
||||||
|
for APP in $(dokku_apps "false"); do
|
||||||
|
local DISABLE_CUSTOM_CONFIG="$(fn-plugin-property-get-default "nginx" "$APP" "disable-custom-config" "false")"
|
||||||
|
if [[ "$DISABLE_CUSTOM_CONFIG" == "true" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
local IMAGE_TAG="$(get_running_image_tag "$APP")"
|
||||||
|
local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||||
|
copy_from_image "$IMAGE" "nginx.conf.sigil" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil" 2>/dev/null || true
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
trigger-nginx-vhosts-install() {
|
trigger-nginx-vhosts-install() {
|
||||||
declare desc="nginx-vhosts install trigger"
|
declare desc="nginx-vhosts install trigger"
|
||||||
declare trigger="install"
|
declare trigger="install"
|
||||||
@@ -109,6 +128,7 @@ trigger-nginx-vhosts-install() {
|
|||||||
[[ -f /etc/logrotate.d/nginx ]] && sed -i -e 's/invoke-rc.d/service/g' /etc/logrotate.d/nginx
|
[[ -f /etc/logrotate.d/nginx ]] && sed -i -e 's/invoke-rc.d/service/g' /etc/logrotate.d/nginx
|
||||||
|
|
||||||
fn-nginx-vhosts-migrate-env-vars
|
fn-nginx-vhosts-migrate-env-vars
|
||||||
|
fn-nginx-vhosts-migrate-nginx-conf-sigil
|
||||||
|
|
||||||
# avoid failing runit init calls on install
|
# avoid failing runit init calls on install
|
||||||
# the runit binaries are not yet available during dockerfile building
|
# the runit binaries are not yet available during dockerfile building
|
||||||
|
|||||||
Reference in New Issue
Block a user