mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
improve upgrade script for 15
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"build_from": {
|
||||
"aarch64": "ghcr.io/immich-app/postgres:17-vectorchord0.3.0-pgvectors0.3.0",
|
||||
"amd64": "ghcr.io/immich-app/postgres:17-vectorchord0.3.0-pgvectors0.3.0",
|
||||
"aarch64": "ghcr.io/immich-app/postgres:15-vectorchord0.3.0-pgvectors0.3.0",
|
||||
"amd64": "ghcr.io/immich-app/postgres:15-vectorchord0.3.0-pgvectors0.3.0",
|
||||
"armv7": "postgres:15-alpine"
|
||||
},
|
||||
"codenotary": {
|
||||
|
||||
@@ -46,7 +46,18 @@ install_vchord_and_vectors_for_old_pg() {
|
||||
local old_pgver="$1"
|
||||
local vectorchord_tag="${VECTORCHORD_TAG:-0.3.0}"
|
||||
local pgvectors_tag="${PGVECTORS_TAG:-0.3.0}"
|
||||
local targetarch="${TARGETARCH:-amd64}"
|
||||
case "$(uname -m)" in
|
||||
x86_64 | amd64 | AMD64 | x86-64)
|
||||
targetarch=amd64
|
||||
;;
|
||||
aarch64 | arm64 | ARM64)
|
||||
targetarch=arm64
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported architecture: $(uname -m)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
local vchord_url
|
||||
local vectors_url
|
||||
local vchord_deb
|
||||
@@ -87,7 +98,7 @@ upgrade_postgres_if_needed() {
|
||||
export SUPPORTED_POSTGRES_VERSIONS="$CLUSTER_VERSION $IMAGE_VERSION"
|
||||
|
||||
apt-get update &>/dev/null
|
||||
apt-get install -y procps rsync "postgresql-$IMAGE_VERSION" "postgresql-$CLUSTER_VERSION" &>/dev/null
|
||||
apt-get install -y procps rsync "postgresql-$IMAGE_VERSION" "postgresql-$CLUSTER_VERSION"
|
||||
|
||||
if [ ! -d "$BINARIES_DIR/$CLUSTER_VERSION/bin" ]; then
|
||||
bashio::log.error "Old postgres binaries not found at $BINARIES_DIR/$CLUSTER_VERSION/bin"
|
||||
|
||||
Reference in New Issue
Block a user