Files
dokku/plugins/apps/pre-delete
2015-09-02 11:18:01 -07:00

11 lines
332 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
APP="$1"; CACHE_DIR="$DOKKU_ROOT/$APP/cache"
verify_app_name "$APP"
if [[ -d $CACHE_DIR ]]; then
docker run --rm -v "$CACHE_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
fi