angristan / docker-pleroma

Docker image for the Pleroma federated social network
https://git.pleroma.social/pleroma/pleroma/
MIT License
348 stars 75 forks source link

Database hostname shouldn't be hardcoded #61

Closed arteeh closed 1 year ago

arteeh commented 1 year ago

I run many containers so i don't want one to have such a generic name as "db".

I tried to change the postgres container's name in my docker-compose.yml and I set the new name here and rebuilt. When I launched pleroma the logs would indicate that it's still looking for "db" and failing.

When I change it back to "db" everything works again.

Is this name hardcoded somewhere?

namelivia commented 1 year ago

It seems to work for me, I've been able to setup this container with a different database container name just by setting the DB_HOST environment variable, this is the output of docker inspect for such container, my database container is called pleroma-database:

screenshot

arteeh commented 1 year ago

Yep, setting DB_HOST in my compose file works for me. I guess I missed it before.