refactor: execute one-off commands with DOKKU_APP_SHELL as the initial command

This commit changes the launched pod to use the configured DOKKU_APP_SHELL - default /bin/bash - to launch processes. Without this, if a non-interactive process was executed and did not immediately exit, it was possible for that process to launch twice - once when the pod started, and once when entering the pod. Ideally we know whether the process is interactive or not, but this isn't always possible when running under a tty (non-tty == non-interactive). As such, this also removes the ability to launch one-off containers that do not have a configured shell in the container, but this is better than attempting to run commands twice.
This commit is contained in:
Jose Diaz-Gonzalez committed 2024-11-04 14:29:34 -05:00
1 parent b979a32abf
commit c3a573229d
4 files changed
+46 -80

No files matched your search

+1 -1
View File
@@ -226,7 +226,7 @@ func TriggerPostReleaseBuilder(builderType string, appName string, image string)
return err
}
if err := setScale(appName, image); err != nil {
if err := setScale(appName); err != nil {
return err
}