Docker Compose for Redash (in Powershell)
-
Make sure you have a docker machine up and running. to see if the docker machine is listed run
docker-machine ls -
Make sure your current working directory is the root of this github repository.
-
run
git clone https://github.com/getredash/redash.gitand thencd redash -
Run
docker build . -
Run
docker-compose up -d postgresto see if the docker container is up rundocker ps -
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/manage.py database create_tablesdocker-compose run --rm -d redash /opt/redash/current/manage.py users create --admin --password admin "Admin" "admin"(replace IP with your machine's IP)
docker-compose run --rm -d postgres psql -h 192.168.99.100 -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 192.168.99.100 -p 5432 -U postgres -c "grant select(id,name,type) ON data_sources to redash_reader;"docker-compose run --rm -d postgres psql -h 192.168.99.100 -p 5432 -U postgres -c "grant select(id,name) ON users to redash_reader;"docker-compose run --rm -d postgres psql -h 192.168.99.100 -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/manage.py ds new -n "re:dash metadata" -t "pg" -o "{'user': 'redash_reader', 'password': 'redash_reader', 'host': 'postgres', 'dbname': 'postgres'}"
- Run
docker-compose up -d - Run
docker-machine ls, take note of the ip for the docker machine you are using, and open the web browser. - Visit that docker machine ip at port 80, and you should see a redash login screen.
- Login as admin/admin, and you should be able to add data sources! Congrats!
Try :
docker-compose build workerdocker-compose build server