Skip to content

Use docker compose when docker-compose is not available - #3054

Open
sbrunner wants to merge 1 commit into
5.0from
fix-ci-50
Open

sbrunner wants to merge 1 commit into
5.0from
fix-ci-50

Conversation

@sbrunner

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 13, 2026 09:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) or docker compose (v2)
  • Update Makefile run target to use docker compose syntax
  • Update documentation examples to use docker compose syntax

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.

Comment thread Makefile
.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

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Using the same fallback logic here (e.g., command -v docker-compose >/dev/null 2>&1 && docker-compose || docker compose)
  2. 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.

Copilot uses AI. Check for mistakes.
Comment thread docs/general_presentation/index.html
@sbrunner
sbrunner force-pushed the fix-ci-50 branch 3 times, most recently from 8aa1902 to c5b53a1 Compare February 13, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants