fix: remove CONTAINER files on app clone
This will ensure we don't accidentally destroy old applications if the new app isn't rebuilt or the rebuild fails. Closes #3249
This commit is contained in:
12
plugins/scheduler-docker-local/post-app-clone-setup
Executable file
12
plugins/scheduler-docker-local/post-app-clone-setup
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
scheduler-docker-local-post-app-clone-setup() {
|
||||
declare desc="removes docker-local files when setting up a clone"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
local APP_DIR="$DOKKU_ROOT/$NEW_APP"
|
||||
|
||||
find "$APP_DIR" -type f -name 'CONTAINER.*' -exec rm {} \;
|
||||
}
|
||||
|
||||
scheduler-docker-local-post-app-clone-setup "$@"
|
||||
Reference in New Issue
Block a user