@fringe rose Thanks for the outputs you posted on github!
As I spotted some specific configuration in your docker compose, I decided to discuss it here quickly / more interactively.
- Yesterday I overlooked the anonymous volume definition in your docker compose for Postgres:
database:
volumes:
- /var/lib/postgresql/data
vs Immich default
database:
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
database:
volumes:
- ./postgres:/var/lib/postgresql/data
- Having anonymous volume (without lefthand part before the colon) means that each time after "docker compose down + up" there will be new empty volume created for Postgres. Old volumes are not deleted, but they are not in use too, just lingering in your file system (can be removed with docker system prune).
2.1. Quick experiment/demo: at first the volume was f5d0ec..., then I run down + up, then it becomes 52d1ec...
docker inspect --format '{{ json .Mounts }}' immich_postgres
[{"Type":"volume","Name":"f5d0ec...","Source":"/var/lib/docker/volumes/f5d0ec.../_data","Destination":"/var/lib/postgresql/data",...}]
dcompose down && dcompose up -d
docker inspect --format '{{ json .Mounts }}' immich_postgres
[{"Type":"volume","Name":"52d1ec...","Source":"/var/lib/docker/volumes/52d1ec.../_data","Destination":"/var/lib/postgresql/data",...}]
- Accidental destroy may happen upon running "compose down + up" (as I adviced, sorry). Also it will happen after possible change of Postgres image in the future.
To avoid that I suggest to change the volume definition: follow Immich example, use either option (a) or option (b).