SSH Tunnel when using Docker

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.

Any pointer?

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.

Btw, which docker-compose.yml did you use?