You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/01/31 14:01:54 UTC

[GitHub] rgarrigue opened a new issue #63: Add a /docker-entrypoint-initdb.d dir like mariadb official container

rgarrigue opened a new issue #63: Add a /docker-entrypoint-initdb.d dir like mariadb official container
URL: https://github.com/apache/couchdb-docker/issues/63
 
 
   <!--- Provide a general summary of the issue in the Title above -->
   
   ## Expected Behavior
   <!--- If you're describing a bug, tell us what should happen -->
   <!--- If you're suggesting a change/improvement, tell us how it should work -->
   
   Since couchdb2 the couch comes empty, without _users and so on. I wish there was a way to init a database simply, exactly like it's possible with mariadb / postgres official containers : one can drop a sql or sh file in /docker-entrypoint-initdb.d directoy that'll allow to create databases, users...
   
   
   ## Current Behavior
   <!--- If describing a bug, tell us what happens instead of the expected behavior -->
   <!--- If suggesting a change/improvement, explain the difference from current behavior -->
   Today, gotta script this somehow like starting a temp container just to curl the users / database creation... no ideal, I'm never sure about a proper way to get started
   
   ## Possible Solution
   <!--- Not obligatory, but suggest a fix/reason for the bug, -->
   <!--- or ideas how to implement the addition or change -->
   
   Just quoting mariadb's doc 
   
   > Initializing a fresh instance
   > When a container is started for the first time, a new database with the specified name will be created and initialized with the provided configuration variables. Furthermore, it will execute files with extensions .sh, .sql and .sql.gz that are found in /docker-entrypoint-initdb.d. Files will be executed in alphabetical order. You can easily populate your mariadb services by mounting a SQL dump into that directory and provide custom images with contributed data. SQL files will be imported by default to the database specified by the MYSQL_DATABASE variable.
   
   ## Context
   <!--- How has this issue affected you? What are you trying to accomplish? -->
   <!--- Providing context helps us come up with a solution that is most useful in the real world -->
   I'm writing a docker-compose.yml to get an app running : reverse proxy + app + couchdb. I need the database to be created somehow. Maybe the app doing that would be better, but that's not possible for me now.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services