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:
Jose Diaz-Gonzalez
2023-05-28 23:22:17 -04:00
parent 64f0f2674d
commit eb6f85f083
8 changed files with 60 additions and 1 deletions

View File

@@ -0,0 +1 @@
worker: python3 -u worker.py

View File

@@ -56,6 +56,24 @@ teardown() {
assert_success
}
@test "(scheduler-docker-local) no-web" {
run create_app
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku ps:set $TEST_APP procfile-path worker.Procfile"
echo "output: $output"
echo "status: $status"
assert_success
run deploy_app
echo "output: $output"
echo "status: $status"
assert_success
assert_output_contains "Skipping web as it is missing from the current Procfile"
}
@test "(scheduler-docker-local) init-process" {
run create_app
echo "output: $output"