You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by kl...@apache.org on 2015/08/28 13:30:45 UTC

[6/6] couchdb-docker git commit: 2.0: use haproxy

2.0: use haproxy

fixes #30


Project: http://git-wip-us.apache.org/repos/asf/couchdb-docker/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-docker/commit/e5e33bb6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-docker/tree/e5e33bb6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-docker/diff/e5e33bb6

Branch: refs/heads/master
Commit: e5e33bb6cac5302927bb83d1c23d845ff6adc094
Parents: 2699a91
Author: klaemo <kl...@fastmail.fm>
Authored: Fri Aug 21 20:31:00 2015 +0200
Committer: klaemo <kl...@fastmail.fm>
Committed: Fri Aug 21 20:31:44 2015 +0200

----------------------------------------------------------------------
 2.0-dev/Dockerfile | 4 +++-
 README.md          | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-docker/blob/e5e33bb6/2.0-dev/Dockerfile
----------------------------------------------------------------------
diff --git a/2.0-dev/Dockerfile b/2.0-dev/Dockerfile
index 88b4746..52992dd 100644
--- a/2.0-dev/Dockerfile
+++ b/2.0-dev/Dockerfile
@@ -46,6 +46,8 @@ RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
   && apt-get update -y && apt-get install -y nodejs \
   && npm install -g npm && npm install -g grunt-cli
 
+RUN apt-get -y install haproxy
+
 RUN cd /usr/src/couchdb && ./configure && make
 
 # permissions
@@ -56,7 +58,7 @@ USER couchdb
 # Expose to the outside
 RUN sed -i'' 's/bind_address = 127.0.0.1/bind_address = 0.0.0.0/' /usr/src/couchdb/rel/overlay/etc/default.ini
 
-EXPOSE 15984 25984 35984
+EXPOSE 5984
 WORKDIR /usr/src/couchdb
 
 ENTRYPOINT ["/usr/src/couchdb/dev/run"]

http://git-wip-us.apache.org/repos/asf/couchdb-docker/blob/e5e33bb6/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index e6d1147..959ae4a 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ Available on the docker registry as [klaemo/couchdb:2.0-dev](https://index.docke
 
 ```bash
 # expose the cluster to the world
-[sudo] docker run -p 15984:15984 -p 25984:25984 -p 35984:35984 klaemo/couchdb:2.0-dev
+[sudo] docker run -p 5984:5984 klaemo/couchdb:2.0-dev
 
 [ * ] Setup environment ... ok
 [ * ] Ensure CouchDB is built ... ok
@@ -74,6 +74,8 @@ Time to hack! ...
 docker run -i -t klaemo/couchdb:2.0-dev --admin=foo:bar
 ```
 
+**Note:** The cluster will be exposed on port `5984`, because it internally uses haproxy.
+
 ## Build your own
 
 You can use `klaemo/couchdb` as the base image for your own couchdb instance.