This is an automated email from the ASF dual-hosted git repository. garren pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/couchdb-docker.git
commit 2635562ce1323fafb38d860680afd25efe1bc2eb Author: Romain Brucker <[email protected]> AuthorDate: Tue Oct 4 15:08:31 2016 -0500 Adding the option to set a nodename using an environment variable. closes #82 --- 2.0.0/docker-entrypoint.sh | 4 ++++ README.md | 1 + 2 files changed, 5 insertions(+) diff --git a/2.0.0/docker-entrypoint.sh b/2.0.0/docker-entrypoint.sh index 9441a03..33da092 100755 --- a/2.0.0/docker-entrypoint.sh +++ b/2.0.0/docker-entrypoint.sh @@ -22,6 +22,10 @@ if [ "$1" = '/opt/couchdb/bin/couchdb' ]; then chmod 664 /opt/couchdb/etc/*.ini chmod 775 /opt/couchdb/etc/*.d + if [ ! -z "$NODENAME" ] && ! grep "couchdb@" /opt/couchdb/etc/vm.args; then + echo "-name couchdb@$NODENAME" >> /opt/couchdb/etc/vm.args + fi + if [ "$COUCHDB_USER" ] && [ "$COUCHDB_PASSWORD" ]; then # Create admin printf "[admins]\n%s = %s\n" "$COUCHDB_USER" "$COUCHDB_PASSWORD" > /opt/couchdb/etc/local.d/docker.ini diff --git a/README.md b/README.md index d0fc0d6..adbd17a 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ The node will also start in [admin party mode](http://guide.couchdb.org/draft/se [...] ``` +Note that you can also use the NODENAME environment variable to set the name of the CouchDB node inside the container. Once running, you can visit the new admin interface at `http://dockerhost:5984/_utils/` ## Run (1.6.1) -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
