I have one server running a website along with nginx which are in their own docker containers. I have a completely separate server running postgres inside a container.
How would I go about communicating between the two servers so that the website on the first server can use the database on the second server?
This works fine locally because I can just use docker compose and start everything up on the same docker network. Alternatively I can also start the containers separately and specify an external network for them to use which again works well. However im not sure how to get this all working in production, on different servers (vps).
I am aware of things like Kubernetes which I think could help with this but I have no experience with it and would prefer to avoid that while keeping this all as simple / vanilla as possible. This is just for personal projects and my skills lie in development, not devops.