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

Allow creation of multiple databases #86

Closed

Conversation

victorhahncastell
Copy link

See amended documentation at https://github.com/victorhahncastell/docker-docs/tree/master/mysql. Matching pull request will go to docker-library/docs

@yosifkit
Copy link
Member

This seems a bit complex for an official image and I would rather recommend that a user just write a startup script to creates all the users, databases, and permissions that they need, but I'll defer to @ltangvald since he is from upstream and helps manage these images.

@tianon
Copy link
Member

tianon commented Jul 13, 2015 via email

@victorhahncastell
Copy link
Author

Thanks for your feedback! I agree the implementation is a bit complex--it probably shows that I don't write shell scripts every day. I don't quite see though how the user experience is overly complicated, took me three sentences to amend the documentation.

@ltangvald
Copy link
Collaborator

I agree the implementation is too complex. User experience seems ok, though ideally we'd have something that isn't any different to use whether you want 1 or more databases (e.g. you supply a delimited list to a single variable). I'll see if I can pick some brains about it (though almost everyone is on vacation at the moment).
If we can't find a clean way to implement it, finding a good solution to issue #24 might be a decent compromise.

@ltangvald
Copy link
Collaborator

Is this now adequately solved by the support for running arbitrary init scripts during database creation?

@asymmetric
Copy link

I think the answer to @ltangvald's question is yes, this and #18 should be closed since we can drop scripts in /docker-entrypoint-initdb.d.

@victorhahncastell
Copy link
Author

Guess I should comment on this as this is my PR -- though I don't really have any opinion on this as my work currently does not involve this project any more. Feel free to close :-)

@yosifkit
Copy link
Member

👍

@mrts
Copy link

mrts commented Jul 30, 2017

And here's a sample script and README with instructions for creating any number of databases during initialization by mounting a volume into /docker-entrypoint-initdb.d:
https://github.com/mrts/docker-posgresql-multiple-databases

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

Successfully merging this pull request may close these issues.

6 participants