fix: Redis container no longer starts unconditionally#115
Draft
Copilot wants to merge 3 commits into
Draft
Conversation
- GenerateDefaultServices now only adds Redis when globalCfg.DefaultServices.Redis is true - DockerController.Up() now uses --remove-orphans to stop containers removed from compose - Add tests for Redis-not-started cases and GenerateDefaultServices behavior Agent-Logs-Url: https://github.com/qoliber/magebox/sessions/466f206f-917f-4060-bdc1-e442e17f1906 Co-authored-by: peterjaap <431360+peterjaap@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Redis container start condition based on project config
fix: Redis container no longer starts unconditionally
May 12, 2026
* main: Upload PR build binaries as artifacts and comment links Release v1.17.0 Start only this project's services on magebox start Ensure installation directory exists before installation (#113)
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.
Redis was always started during
magebox bootstrapregardless of whether any project required it, and orphaned containers were never cleaned up when the compose file was regenerated without Redis.Changes
GenerateDefaultServices: Changed unconditionalelse { add Redis }toelse if globalCfg.DefaultServices.Redis { add Redis }. The default global config already hasRedis: true, so fresh installs are unaffected.DockerController.Up(): Added--remove-orphanstodocker compose up -d. Containers removed from the compose file (e.g. Redis when no project needs it) are now stopped on the nextup.Tests: Added coverage for
GenerateDefaultServiceswith Redis enabled/disabled/Valkey, andGenerateGlobalServiceswith no projects requiring Redis.Before / After
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
github.com (HTTP Only)/usr/bin/ssh /usr/bin/ssh -o SendEnv=GIT_PROTOCOL git@github.com git-upload-pack 'org/repo.git'(packet block)nonexistent.invalid.host/tmp/go-build2498265114/b374/teamserver.test /tmp/go-build2498265114/b374/teamserver.test -test.testlogfile=/tmp/go-build2498265114/b374/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(dns block)If you need me to access, download, or install something from one of these locations, you can either: