I have a django docker container deployed on portainer. In settings.py, I specified the ip of where my database is hosted. For some reason it is always redirected to the ip of portainer’s host machine.
PS. I’m using nginx proxy manager for reverse proxy.
2
Answers
Update
I found the problem. Turns out it's just a firewall blocking my connection.
Needs to be on same docker network to communicate as isolated!
Example you can connect to the database simple using db:5432. db is the service name and also address to container accessible from any container on mystack network.