Reputation: 53
I'm trying to connect two docker containers with different servers. In Server A, I have my web application and for the Server B, My Database. How they can connect? Thank you
Upvotes: 2
Views: 803
Reputation: 1373
You need to map the port of database to some host port on Server B then from Server A hosting Webapp you can access the db using Server-b-ip:mapped-port.
Similarly for the web server you need to map port 80 and/or 443 on the Server A for it to be accessible. See references here
Upvotes: 1