I just installed redash using the provided docker-compose.yml file. I need to connect to MySQL using a SSH tunnel.
As I understand it, I need to do so manually, but I’m not sure from what container should I do it. I tried it from server and scheduler, but none worked.
My suggestion is to run another Docker Compose service that setups the tunnel and make it available to the other ones. You can use autossh for this. I never tried using it in a Docker Compose environment, but this seems like a possible approach.
The server container needs access to the tunnel (as it runs a connection test) and then to the adhoc/scheduled workers as they run the queries.
Hello @arikfr thanks for your input. I was trying to use the autossh docker container and did setup everything as described. I still gett error messages when trying to connect to the database in redash. I’m not a docker expert, but this is what I tried:
define fixed ip address to the containers, to use this ip address in the redash data source (did not work)
use default network and get ip address (did not work)
use 127.0.0.1 or localhost (did not work)
Logs of the autssh container are looking fine, no errors so I would say the connection is up and running.
Would love to get your thoughts on that.
Thanks.