I am following up this question here, in which I made the incorrect assumption of being able to access a database using HTTP.
Because I seem to lack conceptual knowledge, I would like to ask a more general question first:
What's a good way to expose multiple databases in a local network, where multiple applications connect with them?
I am already able to use a Host (domain / IP ) with a mapped port to access a database. What I dont like about this appraoch is that there can be very many ports that one needs to keep track of as sys admin. Is there a better way, or is that just part of it?
I was thinking about exposing my databases on a url like data.example.com/project/database
on port 80
and then forwarding it to the respective database container (using proxy such as Traefik).
Can this work?
Some more context info:
The problem I am trying to solve is to make it as easy and sacalable as possible to make database endpoints accessible in my company. For example for other apps to connect to and read/write data. This is coming from sort of docker-microservice-architecture appraoch (in the simplest form) where many databases must co-exist (each in their own docker containers).