Automatically setup data source

Issue Summary

I am trying to do a production setup of Redash running in docker using RDS and ElastiCache for backend. We will be using it to connect to Athena.

Is there a way I can bake the data source configuration into the image so it is pre-configured on deployment? I am trying this locally and looking on the redash containers there is no /opt/redash directory where I’d expect to find configuration files.

Did some more digging, looks like this is stored in postgres in the data_sources table. Seems the best way to do this is to use the data_sources api. As it’s stored in the database and it’s only a one time manual task there is no need to bake this into the image.

1 Like

This is exactly right and how I’d advise you to do it. The data_sources table is encrypted with a secret key which you shouldn’t share between instances. The API method guarantees that the data source connection info is properly secured.

Thanks for the reply, it’s always nice to see an active support forum :slight_smile: Is there a way to disable the encryption?

Also, what is the environment variable that sets this secret key, is it REDASH_SECRET_KEY?

One last question, on the dev docker setup, where is the settings file stored in the image? /opt/redash does not exist.

Not by default.

:point_up: Check out this forum topic for more info about how the encryption works.


Which settings are you looking for?