Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Docker Compose for Redash (in Powershell)

  1. Make sure you have a docker machine up and running. to see if the docker machine is listed run docker-machine ls

  2. Make sure your current working directory is the root of this github repository.

  3. run git clone and then cd redash

  4. Run docker build .

  5. Run docker-compose up -d postgres to see if the docker container is up run docker ps

  6. Run These commands - will be moved to redash docker eventually but we can use it to point to a separate postgres here.

  • This will access the postgres container and set up the database.

    docker-compose run --rm -d redash /opt/redash/current/ database create_tables

    docker-compose run --rm -d redash /opt/redash/current/ users create --admin --password admin "Admin" "admin"

    (replace IP with your machine's IP)

    docker-compose run --rm -d postgres psql -h -p 5432 -U postgres -c "CREATE ROLE redash_reader WITH PASSWORD 'redash_reader' NOCREATEROLE NOCREATEDB NOSUPERUSER LOGIN"

    docker-compose run --rm -d postgres psql -h -p 5432 -U postgres -c "grant select(id,name,type) ON data_sources to redash_reader;"

    docker-compose run --rm -d postgres psql -h -p 5432 -U postgres -c "grant select(id,name) ON users to redash_reader;"

    docker-compose run --rm -d postgres psql -h -p 5432 -U postgres -c "grant select on events, queries, dashboards, widgets, visualizations, query_results to redash_reader;"

    docker-compose run --rm -d redash /opt/redash/current/ ds new -n "re:dash metadata" -t "pg" -o "{'user': 'redash_reader', 'password': 'redash_reader', 'host': 'postgres', 'dbname': 'postgres'}"

  1. Run docker-compose up -d
  2. Run docker-machine ls, take note of the ip for the docker machine you are using, and open the web browser.
  3. Visit that docker machine ip at port 80, and you should see a redash login screen.
  4. Login as admin/admin, and you should be able to add data sources! Congrats!
Copy link

New-in-web commented Jun 5, 2021

Hi i have this error when i run redash
[HPM] Error occurred while trying to proxy request /login?next=/ from localhost:8080 to http://localhost:5000/ (ECONNREFUSED) (
can you help me please

Try :

  • docker-compose build worker
  • docker-compose build server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment