Comment on My Overconfidence Killed Me and My Immich Installation
MangoPenguin@lemmy.blahaj.zone 7 months ago
So first things first, let’s rename database to immich-database, redis to immich-redis
Docker compose does this for you, so a service named database
becomes immich-database
if your compose project is named “immich” by placing it inside a folder by that name. You would have ended up with immich-immich-database
most importantly, let’s give it a port that’s not the default postgres port that everyone wants to use. Easy right? Nope.
Since the postgres container is on that specific compose project network, the port is not shared and won’t interfere with any other compose projects, so there’s no need to change it away from the default.
Essentially just undo your changes and it should all work!
sabreW4K3@lazysoci.al 7 months ago
Thanks for the info. In my head, I had one eye on the future, because honestly, when I chuck it in the corner, I know myself, I won’t be arsed enough to jump from directory to directory to run the individual compose files and so I’m kinda aiming to have everything run from a single docker compose. Am I being naive?
avidamoeba@lemmy.ca 7 months ago
Definitely don’t put everything in a single docker-compose file. For one compose files change from the developer to add/adjust things. You want to make updating to the latest one as easy as copying it over the existing one with minor changes if any, ideally none. For another, you shouldn’t rely on running any of it manually. If you want to chuck it in a corner, write some systems unit files to start and restart the docker compose services for you. Finally, it’s not too difficult to find what compose files you have once you’ve forgotten them. Use
docker compose ls
, plaindocker
and if all else failsfind
,grep
.sabreW4K3@lazysoci.al 7 months ago
I love this community. Thank you so much.
MangoPenguin@lemmy.blahaj.zone 7 months ago
Yeah you definitely want each ‘thing’ in its own compose file. Take a look at Portainer or Dockge to easily manage multiple compose files.