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

docker re:dash's database init should not rely on the tool used to manage the re:dash's container #628

Closed
gissehel opened this issue Oct 26, 2015 · 5 comments

Comments

@gissehel
Copy link

The philosophy behind "not putting postgresql into containers", is to let you use any postgres server (either one dedicated to re:dash within a docker-compose, or one already used for other databases on your infrastructure).

The fact that, in order to init the database, you HAVE to use docker-compose doesn't provide that flexibility having postgres outside of the container should bring you.

@gissehel
Copy link
Author

I'll try to make something else based on the current image.

The best way would be to have an init script into the redash image that can be called the first time instead of supervisor.

The problem:

  • It would require to have psql installed on the redash image, and it's not.

The possible solutions:

  • Install psql on the image
    • pro: Simple only 1 image
    • con: Install psql while not needed except for once for init
  • Use an "init redash" image, that derive from the redash image and that contain psql.
    • pro: The init database use a container that launched with barely the same configuration that the redash image
    • con: Need one more image
  • Don't use psql and use python script to execute basic queries
    • pro: Simple only 1 image, no big useless installation, just small python script
    • con: May be a bit more complex to write (have no idea what modules are installed)

@gissehel
Copy link
Author

I'll try to make a POC for the 3rd or the 2nd solution.

@arikfr
Copy link
Member

arikfr commented Oct 26, 2015

You have a very good point. I like the 1st and 3rd solution. The 3rd should be quite easy to implement considering that Python used for the largest chunk of that script (creating tables).

@gissehel
Copy link
Author

pull request #629 implement the 3rd solution.

@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
Projects
None yet
Development

No branches or pull requests

2 participants