diff --git a/config.yaml b/config.yaml index a4047aba..ed7be6bd 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,5 @@ projectName: platform -image: jembi/platform:2.4.2 +image: jembi/platform:2.4.3 logPath: /tmp/logs packages: diff --git a/interoperability-layer-openhim/docker-compose.await-helper-mongo.yml b/interoperability-layer-openhim/docker-compose.await-helper-mongo.yml new file mode 100644 index 00000000..c02d4ffe --- /dev/null +++ b/interoperability-layer-openhim/docker-compose.await-helper-mongo.yml @@ -0,0 +1,10 @@ +version: '3.9' + +services: + await-helper: + image: jembi/await-helper:1.0.1 + deploy: + replicas: 1 + restart_policy: + condition: none + command: '-k http://mongo-1:27017' diff --git a/interoperability-layer-openhim/swarm.sh b/interoperability-layer-openhim/swarm.sh index 469fa89b..f96dd679 100644 --- a/interoperability-layer-openhim/swarm.sh +++ b/interoperability-layer-openhim/swarm.sh @@ -55,6 +55,8 @@ function initialize_package() { if [[ "${CLUSTERED_MODE}" == "true" ]]; then try "${COMPOSE_FILE_PATH}/initiate-replica-set.sh $STACK" throw "Fatal: Initiate Mongo replica set failed" else + config::await_service_running "mongo-1" "${COMPOSE_FILE_PATH}"/docker-compose.await-helper-mongo.yml "1" "$STACK" + try "docker exec -i $(docker ps -q -f name=openhim_mongo) mongo --eval \"rs.initiate()\"" throw "Could not initiate replica set for the single mongo instance. Some services use \ mongo event listeners which only work with a replica set" fi