openemr / openemr-devops

OpenEMR administration and deployment tooling
GNU General Public License v3.0
91 stars 140 forks source link

Setup script failing on mac #396

Open ElijahBus opened 2 months ago

ElijahBus commented 2 months ago

Describe the bug

When running the script openemr-cmd up on mac , the script is checking for docker-compose to be installed. while this is applicable to most linux distributions, docker desktop app on mac gives the possibility of executing docker-compose with docker compose ... ( no hyphen ).

Not sure whether this should be a bug or a feature request. because it is still possible to install docker-compose on mac, but why ? while we are already offered the same capabilities with docker compose

To Reproduce

Steps to reproduce the behavior:

  1. Install docker desktop on mac
  2. Setup openemr & openemr cmd
  3. cd openemr/docker/development-easy-arm
  4. Run : openemr-cmd
  5. This error is logged: image

Expected behavior

It should set up the local development considering that docker is already installed

Client configuration

bradymiller commented 2 months ago

Hi @ElijahBus , Would consider this a bug. Now it makes sense why the github actions ci engine broke recently (docker-compose no longer existed so needed to change it to docker compose). Looks like docker-compose (V1) is getting deprecated for docker compose (V2). https://stackoverflow.com/questions/66514436/difference-between-docker-compose-and-docker-compose https://docs.docker.com/compose/migrate/

I think to fix this, just need to be more flexible at https://github.com/openemr/openemr-devops/blob/master/utilities/openemr-cmd/openemr-cmd#L33-L37 (if the docker-compose check fails, then need to check for docker compose) (also need to then set the working command as a variable, so it is used correctly in the 4 places where the scripts uses that command)

ElijahBus commented 2 months ago

Hi @bradymiller @camrionnvmff, absolutely, Docker desktop has integrated docker-compose into docker commands, however, I discovered that it is still possible to install docker-compose on macOS with homebrew : https://formulae.brew.sh/formula/docker-compose , which also works :)

I actually fixed this on my side by applying the changes that @bradymiller has suggested in a separate script file, I wanted to get your thoughts first on this before raising a PR with suggested changes. It is good to know that it is more of a version matter than OS matter.