fix: add missing source and respect any user settings for init-process property

This commit is contained in:
Jose Diaz-Gonzalez
2022-08-11 11:51:31 -04:00
parent 293ead4f35
commit 045825857a

View File

@@ -2,6 +2,7 @@
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
main() {
@@ -36,11 +37,15 @@ main() {
CONTAINER_INDEX=$((CONTAINER_INDEX + 1))
done
INJECT_INIT_FLAG="$(fn-plugin-property-get "scheduler-docker-local" "$APP" "init-process" "true")"
INJECT_INIT_FLAG="$(fn-plugin-property-get "scheduler-docker-local" "$APP" "init-process" "")"
if [[ -z "$INJECT_INIT_FLAG" ]]; then
# special-case linuxserver.io images as those always use an s6-overlay
image_vendor="$("$DOCKER_BIN" image inspect --format '{{ index .Config.Labels "org.opencontainers.image.vendor" }}' "$IMAGE")"
if [[ "$image_vendor" == "linuxserver.io" ]]; then
INJECT_INIT_FLAG="false"
image_vendor="$("$DOCKER_BIN" image inspect --format '{{ index .Config.Labels "org.opencontainers.image.vendor" }}' "$IMAGE")"
if [[ "$image_vendor" == "linuxserver.io" ]]; then
INJECT_INIT_FLAG="false"
else
INJECT_INIT_FLAG="true"
fi
fi
PARALLEL_DEPLOY_COUNT="$(plugn trigger "app-json-process-deploy-parallelism" "$APP" "$PROC_TYPE")"