How to set different location for thumbs and library after recent update with docker
I just have seen that 1.52 changed the folder structure. Currently I have all my files on SSD but I would like to change that to the way it is described in github releases:
- thumbs on SSD
- library on HDD
I understand how to migrate to files to new folder structure but it don't know how to specify different location, because in
.env
there's only UPLOAD_LOCATION
without the option to specify which types of files go where.23 Replies
Check the comments here,that works for me; https://github.com/immich-app/immich/discussions/2110
GitHub
v1.52.0 · immich-app immich · Discussion #2110
v1.52.0 Highlights This release includes many bug fixes and hardening of the recent new features in Immich. We are making Immich more robust as we try to move into the stable territory of the appli...
Oh, I didn't look at comments at all. I think that might explain everything. Thanks!
No problem, glad I could help, it's not the most obvious place to look and information is scattered (GitHub issues/discussions/discord) 😁
Feel free to open a PR to update the docs 😛
Is it possible that there is some mistake in this comment? Possibly with locations? Because when I try to deploy a stack (I'm using portainer) I get an error
OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/mnt/docs/immich/encoded-video" to rootfs at "/usr/src/app/upload/encoded-video": mkdir /var/lib/docker/overlay2/908f97d3409f75d7fabec0061503847a2bceea8899b43221d6511609c27586fa/merged/usr/src/app/upload/encoded-video: permission denied: unknown
.
When it comes to permission on host machine, I think everything is OK, because it worked previously.
My docker compose - https://pastebin.com/54QnC6KJ
My .env / stack.env - https://pastebin.com/WwiTTZpqPastebin
version: "3.8"services: immich-server: container_name: immich_s...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
DB_HOSTNAME=immich_postgresDB_USERNAME=postgresDB_PASSWORD=postgres...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Just to clarify - I deleted old stack and all accompanying files and I'm trying to create new one from scratch.
Hmm not sure. I will have to try myself next week to see if I get the same thing.
Ok, thanks for replay. I will try to fix by myself in meantime.😄
Can you print out the permissions of the folders on the source side?
Another option is to remove the original upload volume and see if that was causing some type of conflict
I already try to chmod -R 777 and chown to my user but it didnt change anything
Are you running the stack as another user? You aren't setting guid or uid are you?
No, I haven't set gid and uid so it defaulted to root.
The only thing I can think of is that the volumes are nested. You might need to include all of the folders and remove the parent (original) one.
Do you mean removing parent folder in host machine and then creating all folders?
You can leave the host machine as is
I'm just saying that the new mounts result in there being nested mounts in the container.
One mounts to /usr/src/app/upload and another one mounts to /use/src/app/upload/thumbs, which I'm saying could cause some weird issues.
So I was just wondering if you removed the mount that went to /usr/src/app/upload if it would change anything.
Can try that in a second.
If I completely remove
- ${UPLOAD_LOCATION}:/usr/src/app/upload
from docker-compose, stack deploys just fine.Interesting. Maybe nested volumes don't work?
We don't create anything in that top folder. They'll go into one of the sub folders listed in the release note. Maybe you need all 4 mounts instead.
Library, upload, thumbs, encoded video, and profile. I guess that's 5 actually.
I guess, I will try that and report what happens.
So good news is that it deployed successfully. (At first I didn't change
/usr/src/app/upload/
to /usr/src/app/upload/upload
, but I figured it out.)
Unfortunately, now when I'm trying to connect I'm getting this lovely message 500 connect ECONNREFUSED 192.168.240.8:3001
So it doesnt connect to immich-server. I think that I had to make some other mistake.Pastebin
DOCKERCOMPOSEversion: "3.8"services: immich-server: container_n...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
And in logs of immich_server it says that it cannot connect to database -
[Nest] 1 - 04/02/2023, 12:30:30 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (6)... Error: connect ECONNREFUSED 127.0.0.1:5432
. I don't how but something has messed up.
end of logs form immich-redis -> 1:M 02 Apr 2023 00:21:33.676 * Ready to accept connections
end of logs form immich_postgress -> 2023-04-02 00:21:35.272 UTC [1] LOG: database system is ready to accept connections
127.0.0.1 is the default IP for the database. You need to set that env
DB_HOSTNAME=immich_postgres
It helped. Thanks a lot for your time.