Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Docker Compose command usage to support Docker Compose v2 (docker compose) as a fallback when Docker Compose v1 (docker-compose) is not available. The Python implementation provides backward compatibility through automatic detection, while documentation and build scripts are updated to use the newer syntax.
Changes:
- Add fallback logic in Python code to detect and use either
docker-compose(v1) ordocker compose(v2) - Update Makefile run target to use
docker composesyntax - Update documentation examples to use
docker composesyntax
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| c2cwsgiutils/acceptance/composition.py | Implements automatic fallback between docker-compose and docker compose using shutil.which() |
| Makefile | Updates run target to use docker compose instead of docker-compose |
| docs/general_presentation/index.html | Updates example command to use docker compose instead of docker-compose |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .PHONY: run | ||
| run: build_test_app | ||
| cd acceptance_tests/tests/; TEST_IP=172.17.0.1 docker-compose up | ||
| cd acceptance_tests/tests/; TEST_IP=172.17.0.1 docker compose up |
There was a problem hiding this comment.
This hardcodes docker compose, but the Python code in c2cwsgiutils/acceptance/composition.py has fallback logic that prefers docker-compose if available. For consistency, consider either:
- Using the same fallback logic here (e.g.,
command -v docker-compose >/dev/null 2>&1 && docker-compose || docker compose) - Or ensuring the documentation clearly states that
docker compose(v2) is now the standard
This inconsistency could lead to confusion if developers have both versions installed and get different behavior depending on how they run the tests.
8aa1902 to
c5b53a1
Compare
No description provided.