medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
438 stars 209 forks source link

Upgrade to docker compose v2 #8781

Open garethbowen opened 8 months ago

garethbowen commented 8 months ago

Describe the issue

In a few places in our code and documentation we use the docker-compose command (NB: with hyphen) which is the v1 version of the command. v1 has been deprecated in favour of v2 which uses docker compose (NB: with space).

Describe the improvement you'd like

Update the code and the dev environment setup docs to specify v2 use.

Describe alternatives you've considered

You can just alias the hyphen version to the non-hyphen version but that's an additional unnecessary install step.

lorerod commented 4 months ago

Hi @gareth, I was planning on starting work on this issue and found this branch. Can I continue the work you already started there? I would love to know your thoughts.

garethbowen commented 4 months ago

@lorerod Yes! Please. I got a bit stuck as you can see but I'm happy to hand over to you. It's a bit out of date so if it's too hard to rebase you can just start a new one and patch some of the ideas over. The only thing to be aware of is we're gradually shifting off docker compose, starting with CI, which might mean some of this work isn't needed. @dianabarsan Is the plan eventually to remove docker compose from all e2e testing (including local)?

dianabarsan commented 4 months ago

I think it's a pain to run things over K3D, especially locally. I think we should change CI e2e tests to run over our chosen prod architecture. Having to support both docker compose and k3d in our e2e tests might be annoying, especially if we end up never running CI tests over docker.

A significant amount of changes are coming with the addition of k3d, especially on how we run commands. I think we should wait for that to land (I'm hoping this is quite soon, I'm just getting the last details in), and then start working on migrating to docker compose.

garethbowen commented 1 month ago

This should now be resolved in cht-core. There are however many references to docker-compose in cht-docs, and possibly cht-conf and other repos that we should resolve too.

lorerod commented 1 month ago

Also, docker helper scripts need to be updated.

mrjones-plip commented 1 month ago

Note that Helper should be fixed in https://github.com/medic/cht-core/pull/9309