lorenzopicoli / redash-heroku

Dockerfiles for hosting redash on heroku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redash

This is pretty much a mirror of the official docker-compose file, but with an updated version tag

How to setup

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

How to run

 docker-compose up -d

First run

On your first run you must run

docker-compose run --rm server create_db

To setup the redash database

How to upgrade

  • Update redash's docker tags in docker compose file

See also https://redash.io/help/open-source/admin-guide/how-to-upgrade

FAQ

  • 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 be postgres 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 running docker-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

About

Dockerfiles for hosting redash on heroku