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:
1 parent
cfd8f237df
commit
f3a33e74d7
1 file changed
+12
+12
@@ -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