Issue Summary

Having difficulty to connect Redash docker instance to Postgresql database in the localhost

Technical details:

How to revise the docker-compose.yml file in order to use the readily available Postgresql database in the localhost instead of using the docker image Postgresql?

Do you mean to connect your localhost as a data source for running queries? Or do you mean for Redash to use your localhost database to store its application metadata and state?

In the first case, add a port forwarding rule to your docker-compose.yml then set up the Data Source to connect through that port. Also, remember that you won’t type “localhost” as the IP address in Redash since this would point back to the docker container. Instead use the local IP of your host system (typically 192.168.x.x).

The second case is more complex and not recommended.

Can you tell me how can we add a port forward rule in docker-compose.yml for this scenario?