How to connect database client through nginx to a pgsql database

Viewed 344

I have a pgsql db made with docker which is not accessible outsite of if. It is exposed on port 5432.

my db is hosted on my virtual machine ubuntu 20 IP = 123.4.5.6

I use a container with nginx for accessing my frontend and my backend

I want to access my database outside of the VM with a database client when calling the url 123.4.5.6/db-backdoor:5432/db-name

I've done some research and it's not possible to connect the db with http.

How should I write my nginx.conf for connecting my database client and how should I configure my databse client ?

0 Answers
Related