diff --git a/CHANGELOG.md b/CHANGELOG.md index a3c1564f2b..75133b8a08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ - Custom form field validators from country config will work offline. [#7478](https://github.com/opencrvs/opencrvs-core/issues/7478) - Registrar had to retry from outbox every time they corrected a record. [#7583](https://github.com/opencrvs/opencrvs-core/issues/7583) +- Local environment setup command (`bash setup.sh`) could fail in machines that didn't have a unrelated `compose` binary. Fixed to check for Docker Compose. [#7609](https://github.com/opencrvs/opencrvs-core/pull/7609) - Fix wrong status shown in the Comparison View page of the duplicate record [#7439](https://github.com/opencrvs/opencrvs-core/issues/7439) ### Breaking changes diff --git a/setup.sh b/setup.sh index de48190add..13cb580703 100755 --- a/setup.sh +++ b/setup.sh @@ -170,9 +170,7 @@ echo nvmVersion=$(cat .nvmrc | tr -d '[:space:]') dependencies=( "docker" "node" "yarn" "tmux") -if [ $OS == "UBUNTU" ]; then - dependencies+=("docker compose") -fi + for i in "${dependencies[@]}" do : @@ -192,15 +190,7 @@ do echo "Please follow the documentation here: https://docs.docker.com/desktop/mac/install/" fi fi - if [ $i == "docker compose" ] ; then - if [ $OS == "UBUNTU" ]; then - echo "You need to install Docker Compose, or if you did, we can't find it and perhaps it is not in your PATH. Please fix your docker compose installation." - echo "Please follow the documentation here: https://docs.docker.com/compose/install/" - else - echo "You need to install Docker Desktop for Mac, or if you did, we can't find it and perhaps it is not in your PATH. Please fix your docker installation." - echo "Please follow the documentation here: https://docs.docker.com/desktop/mac/install/" - fi - fi + if [ $i == "node" ] ; then echo "You need to install Node, or if you did, we can't find it and perhaps it is not in your PATH. Please fix your node installation." echo "We recommend you install Node $nvmVersion as this release has been tested on that version." @@ -242,6 +232,26 @@ do fi done +### +# +# Check if Docker Compose exists +# +### + +if ! docker compose version &> /dev/null +then + echo "Docker Compose is not available in your Docker installation" + echo "Your Docker version may be too old to include Docker Compose as part of the Docker CLI." + + if [ $OS == "UBUNTU" ]; then + echo "Please follow the installation instructions here: https://docs.docker.com/engine/install/ubuntu/" + else + echo "Please follow the installation instructions here: https://docs.docker.com/desktop/mac/install/" + fi + + exit 1 +fi + ### # # Check Node.js version