Uh oh!
There was an error while loading. Please reload this page.
Docker compose clouseau example - #182
Conversation
kocolosk
commented
Jun 3, 2020
Nice! That’s a very welcome contribution. Will take a closer look later today. |
wohali
commented
Jun 3, 2020
We might also want to put this into the CouchDB docs, @kocolosk . |
kocolosk
commented
Jun 4, 2020
Yes that's a good idea @wohali. @rkleine, I'd like to pull a version of these instructions into the main README of the repo for greater visibility. I'm mulling over simplifying them by pointing to a pre-built Clouseau image instead of including all of the configuration files and instructions to assemble a working container from a vanilla OpenJDK image. Of course we don't have any official or semi-official image for Clouseau, so that complicates matters a bit. Will give it some thought. Just wanted to keep you posted. |
wohali
commented
Jun 4, 2020
@kocolosk I'd only suggested a subdir because I assumed the files mentioned in here would go in there, separate to the README. We can def. put this in the README here as well as ensure they end up in the Docker official docs if you like, as well as the main CouchDB docs. |
Hi @kocolosk, Im using a local docker clouseau image. Maybe this save you some time ; ./etc/clouseau.ini[clouseau]name=clouseau@127.0.0.1
cookie=monster
dir=/var/lib/clouseau
max_indexes_open=500# ./etc/log4j.propertieslog4j.rootLogger=debug, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %c [%p] %m%n# DockerfileFROM openjdk:8-alpine
RUN apk add --update unzip
RUN wget -q -O clouseau-2.17.0-dist.zip https://github.com/cloudant-labs/clouseau/releases/download/2.17.0/clouseau-2.17.0-dist.zip
RUN unzip clouseau-2.17.0-dist.zip
RUN rm -rf clouseau-2.17.0-dist.zip
RUN mkdir -p /opt/clouseau/etc
COPY etc /opt/clouseau/etc
CMD java -server \
-classpath '/clouseau-2.17.0/*' \
-Xmx2G -Dsun.net.inetaddr.ttl=30 \
-Dsun.net.inetaddr.negative.ttl=30 \
-Dlog4j.configuration=file:/opt/clouseau/etc/log4j.properties \
-XX:OnOutOfMemoryError="kill -9 %p" \
-XX:+UseConcMarkSweepGC \
-XX:+CMSParallelRemarkEnabled com.cloudant.clouseau.Main /opt/clouseau/etc/clouseau.ini# build
docker build --tag clouseau:2.17.0 --tag clouseau:latest .With # start couchdb
docker run --rm -p "5984:5984" --name couchdb -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=admin -e NODENAME=127.0.0.1 -e ERL_FLAGS="-setcookie monster" couchdb:3.1.0
# start cluseau
docker run --rm --network=container:couchdb --name clouseau clouseau:2.17.0Or with version: '3.8'services:
couchdb1:
image: couchdb:3.1.0restart: alwaysports:
- 5984:5984environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=admin
- NODENAME=127.0.0.1
- ERL_FLAGS=-setcookie monsterclouseau1:
image: clouseau:2.17.0restart: alwaysdepends_on:
- couchdb1network_mode: service:couchdb1docker-compose up# test
curl -sSL http://localhost:5984 | grep "search" |
wohali
commented
Mar 16, 2021
@rkleine Would love to merge this. Can you unify this with the changes proposed in #186 - if needed? Alternately if you'd like to just put this directly in our documentation, I'd be happy to merge a PR in our repo there, https://github.com/apache/couchdb-documentation/pulls |
I tried to get it running the way @rkleine described. Definitely got much further than I did on my own :D I'm not sure what's going on. It looks like it can indeed reach CouchDB is running fine in its container and I can successfully reach couch on localhost from within the Any ideas? Update: Played around with https://hub.docker.com/r/kocolosk/couchdb-search which gives me the following errors: In the CouchDB container: In the couchdb-search container: |
This 100% worked with couchdb version 3.1.0, but if I bump to 3.3.2 I get this error: I've removed the ERL_FLAGS=-setcookie monster and couchdb starts, but when I query the index I get this error:
|
big-r81
commented
Nov 8, 2023
Bring back the setcookie line. You need to set a cookie value other than "monster". |
Overview
Docker compose example with clouseau plugin
GitHub issue number
Fixed#8