feat: skip scaled processes that are missing in the Procfile
This allows folks to deploy apps that don't have a web process without needing to scale that process down before/after the first deploy. Note that the formations key in the app.json or a manual scale of other processes will be necessary to start anything non-web. Closes #5700
This commit is contained in:
@@ -37,6 +37,11 @@ trigger-scheduler-docker-local-scheduler-deploy() {
|
||||
|
||||
DOKKU_START_CMD="$(config_get "$APP" DOKKU_START_CMD || true)"
|
||||
|
||||
local PROCFILE_EXISTS=false
|
||||
if plugn trigger procfile-exists "$APP" 2>/dev/null; then
|
||||
PROCFILE_EXISTS=true
|
||||
fi
|
||||
|
||||
local DOKKU_WAIT_TO_RETIRE="$(plugn trigger checks-get-property "$APP" wait-to-retire)"
|
||||
export DOKKU_WAIT_TO_RETIRE
|
||||
|
||||
@@ -54,6 +59,12 @@ trigger-scheduler-docker-local-scheduler-deploy() {
|
||||
continue
|
||||
fi
|
||||
|
||||
local PROC_CMD=$(plugn trigger procfile-get-command "$APP" "$PROC_TYPE" "5000" 2>/dev/null || echo '')
|
||||
if [[ "$PROCFILE_EXISTS" == true ]] && [[ "$PROC_CMD" == "" ]]; then
|
||||
dokku_log_warn "Skipping $PROC_TYPE as it is missing from the current Procfile"
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ "$PROC_TYPE" != "web" ]]; then
|
||||
echo "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/bin/scheduler-deploy-process $APP $IMAGE_SOURCE_TYPE $IMAGE $IMAGE_TAG $PROC_TYPE $PROC_COUNT" >>"$TMP_FILE"
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user