How do you connect your wordpress container to a db on your localhost and not inside the internal docker network?

Viewed 5

If I create a postgres db container and map it to port 5432 on bridge mode inside my docker-compose config, then I can access the postgres db. If I remove the postgres container, and then decide to create a db outside the docker network, then I can't access the db from docker, because my localhost isn't mapped to the docker network. Is there a way to access the db running outside of docker? How?

0 Answers
Related