Repository navigation
Keep COMPOSE_PROFILES when start scripts add ui or backup profiles - #443
Merged
Merged
Conversation
Compose ignores COMPOSE_PROFILES whenever a --profile flag is passed. The start scripts passed --profile for ui and, since #442, for backup and backup-s3. Enabling scheduled backups therefore dropped profiles set in .env, such as ollama. A restore drill on EC2 hit this: after restore, the Ollama container never started, so embeddings would have failed. The start scripts (checked-in, installer-generated, and PowerShell) now merge ui, backup, and backup-s3 into COMPOSE_PROFILES instead of passing flags. A failed S3 upload also explains the EC2 metadata hop limit, because the AWS CLI only reports "Unable to locate credentials". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Summary
Compose ignores
COMPOSE_PROFILESwhenever a--profileflag is passed. The start scripts passed--profile ui, and since #442 also--profile backupand--profile backup-s3. So turning on scheduled backups silently dropped any profile set in.env, such asollama.I hit this in a restore drill on EC2. After
restore --restore-config, Morphik started without its Ollama container, so embeddings would have failed.The checked-in
start-morphik.sh, the installer-generated copy, and the PowerShell one now addui,backup, andbackup-s3toCOMPOSE_PROFILESinstead of passing flags. This also fixes the olderuiplusollamacase.A failed S3 upload now also mentions the EC2 metadata hop limit. The AWS CLI only says "Unable to locate credentials".
Test plan
pytest core/tests/unit/test_docker_lifecycle.py core/tests/unit/test_docker_installer_safety.py core/tests/unit/test_backup_tool.py: 50 passed. A new test coversCOMPOSE_PROFILES="ollama,ui"in.envwith backups on, for both the checked-in and the generated script.start-morphik.ps1run under pwsh 7.4 with a stubbeddockergivesCOMPOSE_PROFILES=ollama,ui,backup,backup-s3and passes no--profileflags.start-morphik.shstarted ollama, backup, and backup-s3 together. The restored deployment then matched the original exactly.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.