diff --git a/postgres/build.json b/postgres/build.json index 16af87789..6405c0efe 100644 --- a/postgres/build.json +++ b/postgres/build.json @@ -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": { diff --git a/postgres/rootfs/etc/cont-init.d/99-run.sh b/postgres/rootfs/etc/cont-init.d/99-run.sh index 5113bc3ac..87079cf81 100755 --- a/postgres/rootfs/etc/cont-init.d/99-run.sh +++ b/postgres/rootfs/etc/cont-init.d/99-run.sh @@ -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"