Skip to content

Use compose file argument in docker compose down command#1519

Draft
Copilot wants to merge 4 commits intorelease-1.2.0from
copilot/run-docker-compose-down
Draft

Use compose file argument in docker compose down command#1519
Copilot wants to merge 4 commits intorelease-1.2.0from
copilot/run-docker-compose-down

Conversation

Copy link

Copilot AI commented Jan 14, 2026

The install script was calling docker compose down without specifying which compose file to use, potentially bringing down the wrong services when switching between sample applications that use different compose files (smart-intersection uses compose-scenescape.yml, others use compose-without-scenescape.yml).

Changes

  • Introduced RI_COMPOSE_FILE_ARG variable to store the appropriate compose file path based on SAMPLE_APP
  • Updated docker compose commands to use -f "$RI_COMPOSE_FILE_ARG" flag for both ps and down operations
  • Moved compose file determination before the docker compose down command instead of after
  • Added validation for both SAMPLE_APP and compose file existence
# Before
docker compose down

# After
if [ "$SAMPLE_APP" = "smart-intersection" ]; then
    RI_COMPOSE_FILE_ARG="compose-scenescape.yml"
else
    RI_COMPOSE_FILE_ARG="compose-without-scenescape.yml"
fi

docker compose -f "$RI_COMPOSE_FILE_ARG" down

This ensures the correct services are brought down when switching between sample applications.

Original prompt

Work on TODO: run docker compose down with RI_COMPOSE_FILE_ARG as source of docker compose yaml (from metro-ai-suite/smart-traffic-intersection-agent/setup.sh)

Created from VS Code via the GitHub Pull Request extension.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 14, 2026 13:48
- Determine compose file based on SAMPLE_APP before docker compose down
- Add RI_COMPOSE_FILE_ARG variable to store the appropriate compose file path
- Use -f flag with docker compose down to specify the correct compose file
- Simplify copy logic to use the variable

Co-authored-by: krish918 <[email protected]>
Copilot AI changed the title [WIP] Add functionality to run docker compose down with specific file Use compose file argument in docker compose down command Jan 14, 2026
Copilot AI requested a review from krish918 January 14, 2026 13:53
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