couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

Docker add environment variable for mode

Open maxkraft7 opened this issue 2 years ago • 0 comments

Summary

On your docker hub site you mentioned in the Caveats section the following: Please note that CouchDB no longer autocreates system databases for you, as it is not known at startup time if this is a single-node or clustered CouchDB installation. With an environment variable this could be done. right?

Desired Behaviour

Make it possible to define the mode via an environment variable like this:

docker run -e COUCHDB_MODE=SINGLE|CLUSTERED  -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password  couchdb

Possible Solution

Adapt the dockerfile to create the required databases for single mode if the environment variable SINGLE is present.

Additional context

This feature matters to me so that newcomers have a easier time setting up couchdb.

maxkraft7 avatar Aug 25 '23 17:08 maxkraft7