You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2017/04/25 12:38:47 UTC

[couchdb-docker] 35/39: Add COUCHDB_HTTP_PORT/BIND_ADDRESS to 1.6.1 (#92)

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 0efab517f0276df584ccbfcdab62f4b8c1651032
Author: Jean-Christophe Hoelt <ho...@fovea.cc>
AuthorDate: Sun Nov 13 13:28:06 2016 +0200

    Add COUCHDB_HTTP_PORT/BIND_ADDRESS to 1.6.1 (#92)
---
 1.6.1/docker-entrypoint.sh | 3 +++
 README.md                  | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/1.6.1/docker-entrypoint.sh b/1.6.1/docker-entrypoint.sh
index d18a33a..c1c9f56 100755
--- a/1.6.1/docker-entrypoint.sh
+++ b/1.6.1/docker-entrypoint.sh
@@ -36,6 +36,9 @@ if [ "$1" = 'couchdb' ]; then
 		chown couchdb:couchdb /usr/local/etc/couchdb/local.d/docker.ini
 	fi
 
+	printf "[httpd]\nport = %s\nbind_address = %s\n" ${COUCHDB_HTTP_PORT:=5984} ${COUCHDB_HTTP_BIND_ADDRESS:=0.0.0.0} > /usr/local/etc/couchdb/local.d/bind_address.ini
+	chown couchdb:couchdb /usr/local/etc/couchdb/local.d/bind_address.ini
+
 	# if we don't find an [admins] section followed by a non-comment, display a warning
 	if ! grep -Pzoqr '\[admins\]\n[^;]\w+' /usr/local/etc/couchdb; then
 		# The - option suppresses leading tabs but *not* spaces. :)
diff --git a/README.md b/README.md
index adbd17a..b1ee837 100644
--- a/README.md
+++ b/README.md
@@ -70,6 +70,11 @@ curl http://localhost:5984
 If you want to provide your own config, you can either mount a directory at `/usr/local/etc/couchdb`
 or extend the image and `COPY` your `config.ini` (see [Build you own](#build-your-own)).
 
+If you need (or want) to run couchdb in `net=host` mode, you can customize the port and bind address using environment variables:
+
+ - `COUCHDB_HTTP_BIND_ADDRESS` (default: `0.0.0.0`)
+ - `COUCHDB_HTTP_PORT` (default: `5984`)
+
 ### with couchperuser plugin
 
 This build includes the `couchperuser` plugin.

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.