feat: retire intermediate containers after use
Rather than waiting for the next deploy, take advantage of the retire system to retire these containers immediately. Note that since the retire process happens out of band, the containers may stick around for up to 5 minutes, after which point they will be removed. Customization of the wait time to retire - currently 60 seconds - is up for future debate. The containers ultimately haven't been useful for debugging, so keeping them around for longer won't help in most cases, and folks can disable the dokku-retire service (or cron) if that is desired.
This commit is contained in:
1 parent
e0127250ae
commit
ef490f0a05
8 files changed
+45
-2
No files matched your search
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/internal-functions"
|
||||
|
||||
trigger-scheduler-docker-local-scheduler-register-retired() {
|
||||
declare desc="register a container for retiring"
|
||||
declare trigger="scheduler-register-retired"
|
||||
declare APP="$1" CONTAINER_ID="$2" WAIT="${3:-60}"
|
||||
|
||||
fn-scheduler-docker-local-register-retired-container "$APP" "$CONTAINER_ID" "$WAIT"
|
||||
}
|
||||
|
||||
trigger-scheduler-docker-local-scheduler-register-retired "$@"
|
||||
Reference in new issue
Block a user