use immich recommended containers #3

Closed
hermzz wants to merge 1 commits from hermzz/immich:feature/immich-postgres into main
Contributor

Updates redis and postgres images to the ones recommended by immich in their docker-compose.
Add DB_STORAGE_TYPE env var which determines a postgres setting as documented in the immich env var docs.

NOTE: the upgrade from the current postgres to the new one is a major/breaking change, not sure if there's anything else we'd need to do/document here.

Updates redis and postgres images to the ones recommended by immich in their [docker-compose](https://github.com/immich-app/immich/blob/main/docker/docker-compose.yml). Add `DB_STORAGE_TYPE` env var which determines a postgres setting as documented in the [immich env var docs](https://docs.immich.app/install/environment-variables/#database). *NOTE*: the upgrade from the current postgres to the new one is a major/breaking change, not sure if there's anything else we'd need to do/document here.
hermzz added 1 commit 2026-01-14 21:41:12 +00:00
hermzz requested review from yksflip 2026-01-14 21:42:16 +00:00
Owner

Note

: the upgrade from the current postgres to the new one is a major/breaking change, not sure if there's anything else we'd need to do/document here.

would be great to get an idea of how to migrate in the release notes, yes ;)

> _NOTE_: the upgrade from the current postgres to the new one is a major/breaking change, not sure if there's anything else we'd need to do/document here. would be great to get an idea of how to migrate in the release notes, yes ;)
Owner

hey this looks great! thanks for your work! I've added some questionss. Regarding the postgres upgrade I'd agree @val , I think there must be some examples in other recipes where this was done before, but I couldn't find one right away.

hey this looks great! thanks for your work! I've added some questionss. Regarding the postgres upgrade I'd agree @val , I think there must be some examples in other recipes where this was done before, but I couldn't find one right away.
Author
Contributor

I looked more into it and I am unsure about whether this is a major/breaking change or not. It seems the old docker image uses pgvecto.rs v0.2.0, while the new one uses the same pgvecto.rs version, but also includes VectorChord which is a newer more high performance vector db library. I'd assume it's backwards compatible but a) I'd have to check and b) maybe it is desirable to migrate to VectorChord (whatever that means).

I'll do a bit more digging and testing and I'll get back to y'all soon.

I looked more into it and I am unsure about whether this is a major/breaking change or not. It seems the old docker image uses pgvecto.rs v0.2.0, while the new one uses the same pgvecto.rs version, but also includes VectorChord which is a newer more high performance vector db library. I'd assume it's backwards compatible but a) I'd have to check and b) maybe it is desirable to migrate to VectorChord (whatever that means). I'll do a bit more digging and testing and I'll get back to y'all soon.
Author
Contributor

Actually, it seems immich handles the migration for you, and the pgvecto.rs library is included just to handle the migration: https://docs.immich.app/install/upgrading/#migrating-to-vectorchord

Actually, it seems immich handles the migration for you, and the pgvecto.rs library is included just to handle the migration: https://docs.immich.app/install/upgrading/#migrating-to-vectorchord
Owner

Cool, thanks @hermzz could you already try it on a running instance? Will try mine, as soon as I find time ans I can verify my backups work.

As there is an new version of immich, I was wondering if you @hermzz, @yksflip or @philippr would like to co-maintain the recipe?

As I like immich a lot, I could imagine to join a team of maintainers: https://docs.coopcloud.tech/maintainers/maintain/

(Better I open up an issue for this I guess)

Cool, thanks @hermzz could you already try it on a running instance? Will try mine, as soon as I find time ans I can verify my backups work. As there is an new version of immich, I was wondering if you @hermzz, @yksflip or @philippr would like to co-maintain the recipe? As I like immich a lot, I could imagine to join a team of maintainers: https://docs.coopcloud.tech/maintainers/maintain/ (Better I open up an issue for this I guess)
Author
Contributor

I created an immich instance with the current db (tensorchord/pgvecto-rs:pg14-v0.2.0), added 939 photos to a library, shutdown, changed the db to the new one (ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23) and restarted. This showed up in the app logs:

app-1  | [Nest] 7  - 01/31/2026, 10:49:37 PM     LOG [Microservices:DatabaseRepository] Creating VectorChord extension
app-1  | [Nest] 7  - 01/31/2026, 10:49:37 PM     LOG [Microservices:DatabaseRepository] targetLists=1, current=1 for clip_index of 939 rows
app-1  | [Nest] 7  - 01/31/2026, 10:49:37 PM     LOG [Microservices:DatabaseRepository] Reindexing clip_index (This may take a while, do not restart)
app-1  | [Nest] 7  - 01/31/2026, 10:49:37 PM     LOG [Microservices:DatabaseRepository] targetLists=1, current=1 for face_index of 636 rows
app-1  | [Nest] 7  - 01/31/2026, 10:49:37 PM     LOG [Microservices:DatabaseRepository] Reindexing face_index (This may take a while, do not restart)
app-1  | [Nest] 7  - 01/31/2026, 10:49:37 PM     LOG [Microservices:DatabaseRepository] Reindexed face_index
app-1  | [Nest] 7  - 01/31/2026, 10:49:37 PM     LOG [Microservices:DatabaseRepository] Reindexed clip_index
app-1  | [Nest] 7  - 01/31/2026, 10:49:37 PM     LOG [Microservices:DatabaseRepository] Dropping pgvecto.rs extension
I created an immich instance with the current db (tensorchord/pgvecto-rs:pg14-v0.2.0), added 939 photos to a library, shutdown, changed the db to the new one (ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23) and restarted. This showed up in the `app` logs: ``` app-1 | [Nest] 7 - 01/31/2026, 10:49:37 PM LOG [Microservices:DatabaseRepository] Creating VectorChord extension app-1 | [Nest] 7 - 01/31/2026, 10:49:37 PM LOG [Microservices:DatabaseRepository] targetLists=1, current=1 for clip_index of 939 rows app-1 | [Nest] 7 - 01/31/2026, 10:49:37 PM LOG [Microservices:DatabaseRepository] Reindexing clip_index (This may take a while, do not restart) app-1 | [Nest] 7 - 01/31/2026, 10:49:37 PM LOG [Microservices:DatabaseRepository] targetLists=1, current=1 for face_index of 636 rows app-1 | [Nest] 7 - 01/31/2026, 10:49:37 PM LOG [Microservices:DatabaseRepository] Reindexing face_index (This may take a while, do not restart) app-1 | [Nest] 7 - 01/31/2026, 10:49:37 PM LOG [Microservices:DatabaseRepository] Reindexed face_index app-1 | [Nest] 7 - 01/31/2026, 10:49:37 PM LOG [Microservices:DatabaseRepository] Reindexed clip_index app-1 | [Nest] 7 - 01/31/2026, 10:49:37 PM LOG [Microservices:DatabaseRepository] Dropping pgvecto.rs extension ```
Owner

After adding backups, I changed it as well to the other images and can confirm, that it works perfectly :)
As I added backup-functionality and at the same time updated the version succesfully to the most recent I would suggest that I post another pull request which you could review?

After adding backups, I changed it as well to the other images and can confirm, that it works perfectly :) As I added backup-functionality and at the same time updated the version succesfully to the most recent I would suggest that I post another pull request which you could review?
hermzz closed this pull request 2026-02-11 15:08:22 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.