I’m trying to set up a multi-node instance in docker compose. The steps I’ve taken are follow the 4.x compose steps, but with a few changes. Specifically instead of downloading the single node compose file, i’ve downloaded the multi-node file.
Otherwise my directory structure is:
multi-couch-test
- compose
- cht-core.yml
- cht-couchdb-clustered.yml
- compose.yml
- couchdb
- .env
And my .env
looks like this:
NGINX_HTTP_PORT=8080
NGINX_HTTPS_PORT=8443
COUCHDB_USER=medic
COUCHDB_PASSWORD=password
CHT_COMPOSE_PROJECT_NAME=cht_4_app_developer
DOCKER_CONFIG_PATH=/var/home/mrjones/Documents/medicmobile/multi-couch-test
COUCHDB_SECRET=19f3b9fb1d7aba1ef4d1c5ed709512ee
COUCHDB_UUID=e7122b1e463de4449fb05b0c494b0224
COUCHDB_DATA=/var/home/mrjones/Documents/medicmobile/multi-couch-test/couchdb
CHT_COMPOSE_PATH=/var/home/mrjones/Documents/medicmobile/multi-couch-test/compose
CHT_NETWORK=cht_4_app_developer
The error I get is in my cht-upgrade-service
container after I run docker compose up -d
Error response from daemon: error while creating mount source path '/docker-compose/srv3': mkdir /docker-compose: operation not permitted
at ChildProcess.<anonymous> (/app/src/docker-compose-cli.js:35:25)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
I note that this alternates between srv3
, srv2
and srv1
.
Looking at the mount in the upgrade service compose file I see it’s bound to ${CHT_COMPOSE_PATH}
and my .env
file above points this to /var/home/mrjones/Documents/medicmobile/multi-couch-test/compose
. This path is valid and exists. If I manually create the three srv*
directories in there, the error persists.
I seem to recall that multi-node “just worked” back in the early days of 4.x - is multi-node docker still supported? Or do you need to use k8s? I just want to set up a development instance of multi-node and docker is a lot easier for me than k8s (or k3s etc).
I’m trying on CHT 4.11, but I found the same error on CHT 4.17. I’m on Docker version 28.0.2, build 0442a73 on Bluefin.