This is pretty much a mirror of the official docker-compose file, but with an updated version tag
Create a .env
file with the following information:
REDASH_COOKIE_SECRET=xxx
POSTGRES_HOST_AUTH_METHOD=trust
REDASH_DATABASE_URL=postgresql://postgres@postgres/postgres
REDASH_REDIS_URL=redis://redis:6379/0
docker-compose up -d
On your first run you must run
docker-compose run --rm server create_db
To setup the redash database
- Update redash's docker tags in docker compose file
See also https://redash.io/help/open-source/admin-guide/how-to-upgrade
- I get an error when adding a new data source:
If you're running locally the host should be
host.docker.internal
. The user should bepostgres
and then your database name. - I want to migrate my redash configuration (queries, etc) to another setup.
The easiest way is to simply do a dump of the whole
postgres
database and instead of runningdocker-compose run --rm server create_db
on the new setup, restore the backup on the first run. If that's not possible and you find yourself migrating data only you might need to:- Migrate a data-only pg_dump into the new setup
- On the new setup, delete the data sources you have (which includes deleting query_results and setting null values to data_source_id across multiple tables)
- Add a new data source on the dashboard
- Update back all the columns you set to null to the new data source
- Go back to the old setup and dump only the
query_results
table. - Back on the new setup, create a dummy data source with
insert into data_sources (id,org_id,name,type,encrypted_options,queue_name, scheduled_queue_name, created_at) values (<id-of-the-data-source-deleted>,1,'a',1,'','','',now());
- Restore the data only dump of
query_results
into the new database - Update all
query_results
to point to the correct source created through the dashboard - Delete the dummy data_source