Replies: 3 comments 2 replies
-
I think a PR against https://github.com/apache/couchdb-docker would have a good chance of being accepted. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. I did some further research on why the healthcheck fails for couchdb. GitLab attempts to connect to the highest port number exposed by the container [1]. I noticed this when first exposing ports I'd still be willing to open a PR for couchdb-docker. What's your opinion on this, now that you know that the docker image not running in single node mode doesn't actually cause any issues, just some error messages? [1] https://gitlab.com/gitlab-org/gitlab-runner/-/blob/82ee8b29637f4b5406e206b97710d279165bdd30/executors/docker/docker.go#L1325 |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
Hello,
at work we're using gitlab ci to test a project. The project supports couchdb as a database backend, that's why we're also running tests on it.
However, since couchdb doesn't run in single-node mode, required databases like
_users
or_replicator
are not created automatically. That's (probably) why the setup of couchdb doesn't complete successfully and eventually times out: https://gist.github.com/jkhsjdhjs/203d7c762a05d9cbf2b11757911def3aThe gitlab ci test configuration is the following:
Single-node mode can only be enabled with a config file, which has be placed or mounted inside the docker container. That's why @wohali proposed the following for the gitlab ci configuration:
While I'm convinced this would work, for it to work inside the gitlab ci runner, we'd have to change the image to something that includes the
docker
command (we're currently usingpython:3.6
).And even with
gitlab/dind
- an image, that includes docker - I couldn't get it to work (TBF I didn't test further after it failed the first time). See apache/couchdb-docker#54 (comment)I also asked in
#gitlab
on freenode for a solution, the only suggestion there was to maintain my own fork of couchdb-docker in single-node mode, or to build a single-node docker image as part of the pipeline.Because there seems to be no easy solution to this for me, I suggest adding a
COUCHDB_SINGLE_NODE
environment variable to couchdb-docker, which is set tofalse
or0
by default to preserve existing behavior.I'd like to hear your opinion on this, and if you have other ideas to solve this issue, please let me hear them!
Beta Was this translation helpful? Give feedback.
All reactions