mirror of
https://github.com/iio612/immich-native.git
synced 2026-04-14 02:41:06 +00:00
Migrate to VectorChord and match upstream
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
This commit is contained in:
@@ -38,6 +38,8 @@ pgvector is included in the official PostgreSQL's APT repository:
|
||||
sudo apt install postgresql(-17)-pgvector
|
||||
```
|
||||
|
||||
* [VectorChord](https://docs.vectorchord.ai/vectorchord/getting-started/installation.html)
|
||||
|
||||
* [FFmpeg](https://github.com/FFmpeg/FFmpeg)
|
||||
|
||||
Immich uses FFmpeg to process media.
|
||||
@@ -114,6 +116,7 @@ postgres=# create user immich with encrypted password 'YOUR_STRONG_RANDOM_PW';
|
||||
postgres=# grant all privileges on database immich to immich;
|
||||
postgres=# ALTER USER immich WITH SUPERUSER;
|
||||
postgres=# CREATE EXTENSION IF NOT EXISTS vector;
|
||||
postgres=# CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
|
||||
postgres=# \q
|
||||
```
|
||||
|
||||
|
||||
1
env
1
env
@@ -9,7 +9,6 @@ NODE_ENV=production
|
||||
|
||||
DB_USERNAME=immich
|
||||
DB_DATABASE_NAME=immich
|
||||
DB_VECTOR_EXTENSION=pgvector
|
||||
|
||||
# The location where your uploaded files are stored
|
||||
UPLOAD_LOCATION=./library
|
||||
|
||||
16
install.sh
16
install.sh
@@ -37,6 +37,22 @@ if [[ "$USER" != "immich" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Sanity check, users should have VectorChord enabled
|
||||
if psql -U immich -c "SELECT 1;" > /dev/null 2>&1; then
|
||||
# Immich is installed, check VectorChord
|
||||
if ! psql -U immich -c "SELECT * FROM pg_extension;" | grep "vchord" > /dev/null 2>&1; then
|
||||
echo "VectorChord is not enabled for Immich."
|
||||
echo "Please read https://github.com/immich-app/immich/blob/main/docs/docs/administration/postgres-standalone.md"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [ -e "$IMMICH_PATH/env" ]; then
|
||||
if grep -q DB_VECTOR_EXTENSION "$IMMICH_PATH/env"; then
|
||||
echo "Please remove DB_VECTOR_EXTENSION from your env file"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
umask 077
|
||||
|
||||
|
||||
Reference in New Issue
Block a user