You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2017/09/19 16:17:24 UTC
[couchdb-docker] branch master updated: Make secret configurable
via environment (#25)
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-docker.git
The following commit(s) were added to refs/heads/master by this push:
new 0d4587d Make secret configurable via environment (#25)
0d4587d is described below
commit 0d4587ddeb5a477b3a8646b8cd0b19dc5b9be62d
Author: Dominik Burgdörfer <db...@domachine.de>
AuthorDate: Tue Sep 19 18:17:22 2017 +0200
Make secret configurable via environment (#25)
Fixes #9 issues raised for running a cluster with the 2.1.0 image
---
2.1.0/docker-entrypoint.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/2.1.0/docker-entrypoint.sh b/2.1.0/docker-entrypoint.sh
index 2ff1715..707baba 100755
--- a/2.1.0/docker-entrypoint.sh
+++ b/2.1.0/docker-entrypoint.sh
@@ -33,6 +33,12 @@ if [ "$1" = '/opt/couchdb/bin/couchdb' ]; then
chown couchdb:couchdb /opt/couchdb/etc/local.d/docker.ini
fi
+ if [ "$COUCHDB_SECRET" ]; then
+ # Set secret
+ printf "[couch_httpd_auth]\nsecret = %s\n" "$COUCHDB_SECRET" >> /opt/couchdb/etc/local.d/docker.ini
+ chown couchdb:couchdb /opt/couchdb/etc/local.d/docker.ini
+ fi
+
# if we don't find an [admins] section followed by a non-comment, display a warning
if ! grep -Pzoqr '\[admins\]\n[^;]\w+' /opt/couchdb/etc/local.d/*.ini; then
# The - option suppresses leading tabs but *not* spaces. :)
--
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].