-
Notifications
You must be signed in to change notification settings - Fork 649
Database initialisation scripts and custom db path #148
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
Comments
I think most of these were to do database initialisation and avoid the |
Sorry to break your Dockerfiles. 😞 We didn't detect dbpath since that would require finding and parsing all config files along with the command line arguments. (We can cheat with postgres since it uses the We considered a state file somewhere in the image, but it doesn't help when deleting the container and starting a new version with the same database files. I would say 👍 to using the new init rather than storing the db in the image. The union file system in use (aufs, overlay, etc) for image layers can have negative impact on high I/O. |
No worries, only testing using the new features. Thanks for the details. It probably just needs a documentation line to say init doesn't support paths other than |
Hi tianon, thanks for the swift response! I'm not sure I completely understand the problem, but will changing the container's internal db path to the default (i.e. /data/db) solve the problem (the /data problem at least)? |
I use
FROM mongo
in Dockerfiles that occasionally setup custom mongo db paths.It would be useful to have the initialisation scripts work in these circumstances, currently initialisation scripts run repeatedly as
/data/db
is never initialised.Detecting
--dbpath
on the command line isn't too hard. DetectingdbPath
in a config file is a bit harder.Another option could be using a "state" file, possibly one for each of the "user" and "init" steps, stored in the container somewhere on successful init. Was that approach considered/avoided for the current implementation?
The text was updated successfully, but these errors were encountered: