chore(infra): annotate compose services with profiles#6337
Merged
Conversation
Add profiles: annotations to docker-compose.agent.yml, docker-compose.mongo.yml, and docker-compose.postgres.yml, and export COMPOSE_PROFILES in bin/utils to activate them. The agent service is gated behind the agent profile, activated when SHELLHUB_ENV=development. The mongo and postgres services are gated behind their respective profiles, activated based on SHELLHUB_DATABASE. The required: false flag is added to depends_on entries pointing at profiled services so Compose does not error when the profile is inactive. This is an additive change. The existing COMPOSE_FILE chain in bin/utils is unchanged and the profiles are inert without COMPOSE_PROFILES being set. bin/utils will be removed in the follow-up PR.
|
Claude finished @geovannewashington's task in 3m 51s —— View job Code Review CompleteReviewed 4 files across code quality, security, testing, language patterns, and architecture — no issues found. The code looks good as-is. Key observations from the review:
If you push additional changes and want a new review, tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Added
profiles:annotations todocker-compose.agent.yml,docker-compose.mongo.yml, anddocker-compose.postgres.yml.Exports
COMPOSE_PROFILESinbin/utilsto activate them.Why
Part of the compose wrapper refactor (shellhub-io/team/issues/111). This is the first
incremental step: profiles must be in place before the wrapper replacement lands in the next PR.
How to test
./bin/docker-compose up -ddocker compose ps./bin/docker-compose downSHELLHUB_DATABASE=mongoin.env.override./bin/docker-compose up -ddocker compose psSHELLHUB_ENV=developmentin.env.override, restart,confirm agent is running:
docker compose ps./bin/docker-compose config | grep -A2 'profiles:'