Existing Postgres Container

Hey there. I'm looking to have just a central Postgres database and have successfully created a docker container just for Postgres. When I'm working on the docker compose file i'm not sure what part I'd have to change in order for it to connect to the other database. I did chance a few of the settings already to what I thought they would have to be from what I understood from the readings. I also have my env too. The Username and Password are the same as the Postgres database one.
No description
No description
18 Replies
bo0tzz
bo0tzz3y ago
To use an external pg, you would remove the postgres container from immich's docker-compose.yml, and just configure the .env to point at the external one
Alex Tran
Alex Tran3y ago
I think you have to change the network type of the docker-compose too so that it can communicate with the external network, right?
bo0tzz
bo0tzz3y ago
There's a few different ways to get them able to communicate, but you probably need to change something about the docker networking yes
MoldyTaint
MoldyTaintOP3y ago
Thank you guys for the explanation. I wasn't sure if I had to delete the entire postgres part from the compose file for not for the env file I have the hostname pointing to the address of the postgres stuff. It should work without having it on the same network itself as you can just connect from 192.168.x.x Update! I just successfully started up the Immich compose file. Using the .env with the host of 192.168.68.211 and the port of 5432 it successfully used the external Postgres database. AND I dind't have to do anythign extra with networking. I am so happy. Thank you for such an amazing app
Alex Tran
Alex Tran3y ago
Make sure that the pg database you use is version 14
MoldyTaint
MoldyTaintOP3y ago
Now, my next question. Can I do the same with redis? i've never heard of it before but see a lot of things do depend on it. So instead of installing it over multiple compose can I just do it once and connect it too? Oh. I just used the latest. Is there a reason why 14 is required?
Alex Tran
Alex Tran3y ago
So that when version 15 is out and latest is point to 15 you are still staying at the support version 14
MoldyTaint
MoldyTaintOP3y ago
Oh okay, I genuinly didn't realize that makes a difference
Alex Tran
Alex Tran3y ago
Major version changes usually come with breaking changes and we want to avoid that
MoldyTaint
MoldyTaintOP3y ago
YES I got redis to connect externally too!
MoldyTaint
MoldyTaintOP3y ago
When importing photos via the cli tool, how do you preserve folders as Albums?
No description
Alex Tran
Alex Tran3y ago
put --album at the end of the command
MoldyTaint
MoldyTaintOP3y ago
oh fml
Alex Tran
Alex Tran3y ago
so it is part of the upload comman from immich you were doing it as part of the docker command
MoldyTaint
MoldyTaintOP3y ago
Does it create the albums after all images are imported?
bo0tzz
bo0tzz3y ago
Yes
MoldyTaint
MoldyTaintOP3y ago
Okay. Just didn't want to continue the 6000+ uploads if it didn't. I seen it started and noticed albums weren't being created Just gonna say this again, yall are awesome
bo0tzz
bo0tzz3y ago
If it does go wrong you can always run the command again safely, deduplication will do its thing

Did you find this page helpful?