fix: ensure we cleanup extracted files prior to next deployment
This commit is contained in:
@@ -8,7 +8,7 @@ fn-nginx-vhosts-copy-from-image() {
|
||||
declare APP="$1" IMAGE_NAME="$2" CONF_SIGIL_PATH="$3"
|
||||
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP"
|
||||
rm -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil."*
|
||||
find "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/" -maxdepth 1 -type f -name 'nginx.conf.sigil.*' -delete
|
||||
copy_from_image "$IMAGE_NAME" "$CONF_SIGIL_PATH" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" 2>/dev/null || true
|
||||
if [[ ! -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" ]]; then
|
||||
touch "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID.missing"
|
||||
@@ -31,7 +31,7 @@ fn-nginx-vhosts-copy-from-directory() {
|
||||
return
|
||||
fi
|
||||
|
||||
rm -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil."*
|
||||
find "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/" -maxdepth 1 -type f -name 'nginx.conf.sigil.*' -delete
|
||||
cp -f "$CONF_SIGIL_PATH" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID"
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user