Score:0

Allowing docker to access local webhost Database

dk flag

I am creating a webapp for my business using AppSmith, hosted on Docker.

AppSmith requires access to a database in order to read/write information. Previously I have used MariaDB which is also hosted as a docker Image. However, because this is for business I would rather have the data hosted on an actual server/database rather than a docker image

The address shown for the database is localhost:3306 which I cannot link a docker image/container to since the container is virtual and not actually on the system.

I have also tried linking via ipaddress:3306 but it will not connect, I then tried HeidiSQL to check if it could connect to my Database and had no joy.

After speaking with my hosting provider they have said that they block all external connections to the database and I would need to use SSH in order to open up the database to external connections, however there are a number of related security risks as well as coming with the potential to accidentally damage/corrupt existing databases.

So what I am essentially looking for is a way for docker to open, so that it can allow containers access to my databases

My hosting provider doesnt have much knowlege of docker but did mention Docker Gateway AFAIK172

My understanding is that this can be used to edit the defalt IP address of Docker Containers.

Can this also be used to change the default IP of the docker container to run on the same IP as my webserver and thus allow it to then access the localhost:3306 database?

If so, is there any advise as to where to access the relevant docs to help achieve this?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.