Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup/docker/create_database.sh throws errors #1050

Closed
jeffwidman opened this issue May 11, 2016 · 4 comments
Closed

setup/docker/create_database.sh throws errors #1050

jeffwidman opened this issue May 11, 2016 · 4 comments

Comments

@jeffwidman
Copy link
Contributor

jeffwidman commented May 11, 2016

Setting up a new Redash instance using Docker compose and redash image 0.11.0.b1807

I'm using docker-compose 1.7.1 installed via pip into a virtualenvironment.

When I run ./setup/docker/create_database.sh with the docker-compose virtualenv activated, it ends with the following errors:

Status: Downloaded newer image for redash/redash:0.11.0.b1807
Creating user (admin, Admin)...
Admin: True
Login with Google Auth: False

./setup/docker/create_database.sh: line 22: docker-compose: command not found
./setup/docker/create_database.sh: line 23: docker-compose: command not found
./setup/docker/create_database.sh: line 24: docker-compose: command not found
./setup/docker/create_database.sh: line 25: docker-compose: command not found
./setup/docker/create_database.sh: line 27: docker-compose: command not found

This is because virtualenv prepends PATH with the path to the virtualenv that has docker-compose, but this gets reset when you dump/source the PATH from the postgres container here:
https://github.com/getredash/redash/blob/master/setup/docker/create_database.sh#L16

So from that point onward in the script, docker-compose can't be found.

Also, looks like docker-compose 1.7.0 now supports a docker-compose exec command, perhaps that should be used here?
https://github.com/docker/compose/releases

@arikfr
Copy link
Member

arikfr commented May 12, 2016

Maybe the script runs in a new shell and doesn't find the docker-compose
command.

Try modifying it to activate the virtualenv.

@jeffwidman
Copy link
Contributor Author

It looks like you responded to the initial comment via email... I updated the OP shortly after I posted with more details after I tracked it down further...

@arikfr
Copy link
Member

arikfr commented May 13, 2016

Indeed I have, but my suggestion is still relevant. Just activate the virtualenv as part of this script.

@arikfr
Copy link
Member

arikfr commented Jan 26, 2017

Fixed in #1530.

@arikfr arikfr closed this as completed Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants