Prashant kamble
Prashant kamble

Reputation: 329

How to connect database is running inside the container container from outside?

I have created postgres docker image using docker-compose up command. docker-compose up command is also installing some python packages like poetry ,python3,pip etc. once container is up we are executing docker exec container_name poetry run pytest command to run test cases. Tests running fine on local but on the server it is giving below error. Any quick fix around this issue?

connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address Is the server running on that host and accepting TCP/IP connections?

Upvotes: 0

Views: 78

Answers (0)

Related Questions