Browse Source

fix: [nextcloud] make ``upgrade`` clean possibly unused old images on its way

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cups_service_alpha
Valentin Lab 2 years ago
parent
commit
235d4f8913
  1. 4
      nextcloud/actions/upgrade

4
nextcloud/actions/upgrade

@ -152,6 +152,9 @@ if [ -n "$containers" ]; then
err "Failed to stop container '$container'." err "Failed to stop container '$container'."
exit 1 exit 1
} }
docker rm "$container" > /dev/null || {
err "Couldn't delete container '$container'."
}
container_stopped+=("$container") container_stopped+=("$container")
done done
fi fi
@ -180,6 +183,7 @@ for image_version in "${upgrade_path[@]}"; do
err "Unexpected step where config version ${WHITE}$current_config_version${NORMAL} is more than one major version less than image version ${WHITE}$image_version${NORMAL}" err "Unexpected step where config version ${WHITE}$current_config_version${NORMAL} is more than one major version less than image version ${WHITE}$image_version${NORMAL}"
exit 1 exit 1
fi fi
docker rmi "docker.0k.io/nextcloud:${current_config_version}-myc" >/dev/null 2>&1 || true
if [ "$current_code_version" == "$image_version" ]; then if [ "$current_code_version" == "$image_version" ]; then
## Code already setup, we need to call ``occ upgrade`` by our selves ## Code already setup, we need to call ``occ upgrade`` by our selves
info "Upgrading ${WHITE}$current_config_version${NORMAL} => ${WHITE}$image_version${NORMAL} (db)" info "Upgrading ${WHITE}$current_config_version${NORMAL} => ${WHITE}$image_version${NORMAL} (db)"

Loading…
Cancel
Save