Skip to content

Fix Docker Compose default profile and error documentation#442

Merged
Wirasm merged 5 commits intomainfrom
fix-default-docker-profile
Aug 25, 2025
Merged

Fix Docker Compose default profile and error documentation#442
Wirasm merged 5 commits intomainfrom
fix-default-docker-profile

Conversation

@leex279
Copy link
Copy Markdown
Collaborator

@leex279 leex279 commented Aug 22, 2025

Pull Request

Summary

Enables docker compose up --build -d to work without requiring profile flags by removing profile restrictions from all services. Also incorporates UX improvements from PR #443 with better error documentation and README examples.

Changes Made

  • Removed profile restrictions from all Docker Compose services (archon-server, archon-mcp, archon-agents, archon-frontend)
  • Updated docker-compose.yml comments to document new default startup behavior
  • Enhanced BackendStartupError.tsx with improved UX showing default command first
  • Updated README Quick Start section with better Docker command examples
  • All services now start by default with docker compose up command
  • Merged UX improvements from PR UX: copy-safe Docker command in error modal (follow-up to #442) #443 for better user experience

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Affected Services

  • Frontend (React UI)
  • Server (FastAPI backend)
  • MCP Server (Model Context Protocol)
  • Agents (PydanticAI service)
  • Database (migrations/schema)
  • Docker/Infrastructure
  • Documentation site

Testing

  • All existing tests pass
  • Added new tests for new functionality
  • Manually tested affected user flows
  • Docker builds succeed for all services

Test Evidence

# Verified the requested functionality works without profiles
docker compose up --build -d
# ✅ SUCCESS: All services (server, mcp, agents, frontend) started successfully

# Confirmed all services are healthy
docker compose ps
# Output: All 4 services running and healthy

# Verified clean startup works
docker compose down --remove-orphans
docker compose up -d --build
# ✅ SUCCESS: Clean startup without any profile flags

Checklist

  • My code follows the service architecture patterns
  • If using an AI coding assistant, I used the CLAUDE.md rules
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass locally
  • My changes generate no new warnings
  • I have updated relevant documentation
  • I have verified no regressions in existing features

Breaking Changes

Profile functionality removed: The previous profile-based selective service startup has been removed. All services now start by default.

Migration: Users who previously used docker compose --profile full up can now simply use docker compose up.

Additional Notes

Problem Solved

The original issue was that docker compose up --build -d returned "no service selected" because all services were restricted to specific profiles. This PR solves the core requirement and incorporates UX improvements.

Key Insight

Docker Compose profiles exclude services from default startup. Services with profiles only run when those profiles are explicitly specified. To enable default startup, services must have no profile restrictions.

UX Improvements from PR #443

This PR incorporates the user experience improvements from PR #443:

Enhanced Error Modal:

  • Primary command: docker compose down && docker compose up --build -d (no profile needed)
  • Organized notes: Bullet-pointed guidance about env vars and restart process
  • Profile fallback: Shows docker compose --profile full up --build -d as secondary option for existing users

Improved README Quick Start:

  • Default first: docker compose up --build -d as primary command
  • Profile alternative: Clear explanation when profiles might be needed
  • Better documentation: More intuitive command progression

Current Behavior

  • docker compose up --build -dStarts all services (primary requirement met)
  • Error dialog shows default command with helpful profile fallback
  • README guides users to the simplest working command first

Commit History

  1. f493210: Initial Docker Compose default profile implementation
  2. 140bca2: Use generic YOUR_PROFILE placeholder
  3. 61f60a5: Remove profiles to enable default startup
  4. d9d7287: Update error modal to use 'full' profile with helpful note
  5. 657c7f4: Merge UX improvements from PR UX: copy-safe Docker command in error modal (follow-up to #442) #443

Future Considerations

If selective service startup is needed in the future (e.g., backend-only for hybrid development), this can be implemented through:

  • Service duplication with profile-specific variants
  • Environment-based conditional startup
  • Separate compose files for different deployment modes

User Experience: The primary user request is now satisfied with enhanced UX - docker compose up --build -d works as expected with clear documentation for all user scenarios.

- Add 'default' profile to all services so 'docker compose up --build -d' works without --profile flag
- Update BackendStartupError.tsx to include '--profile full' in Docker command examples
- Update docker-compose.yml comments to document the new default behavior

This allows users to run either:
- docker compose up --build -d (uses default profile, starts all services)
- docker compose --profile full up --build -d (explicit profile, same result)
- docker compose --profile backend up --build -d (backend services only)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 22, 2025

Walkthrough

Updates UI Docker instructions to show a full rebuild startup command (uses down then up --build -d) and expands the note; removes explicit profiles from services in docker-compose.yml, adds top-of-file docs about no-profile default, and adds build.args (BUILDKIT_INLINE_CACHE and port defaults) to several services. README adds the alternative compose command. No runtime/env or app logic changes.

Changes

Cohort / File(s) Summary
UI instruction update
archon-ui-main/src/components/BackendStartupError.tsx
Replaces the displayed Docker Compose command with docker compose down && docker compose up --build -d and expands the note to: recommend using down then up (not restart) so env changes are picked up, instruct to re-run the same profile (backend/frontend/full) if needed, and include a separate sample docker compose --profile full up --build -d. No code or control-flow changes.
Compose file: profiles removed & build args added
docker-compose.yml
Adds top-of-file documentation that docker compose up (no profile) starts all services and that full ≡ no profile; removes explicit profiles entries for archon-server, archon-mcp, archon-agents, and archon-frontend; adds build.args to archon-server, archon-mcp, and archon-agents (BUILDKIT_INLINE_CACHE: 1 and port defaults via ARCHON_*_PORT). No runtime envs or service links changed.
Docs: quick-start command
README.md
In Quick Start / Full Docker Mode, adds an alternative top-level command docker compose up --build -d (with a preceding explanatory comment) while retaining the docker compose --profile full up --build -d example. Documentation-only change.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

I nibble keys and tweak the stack,
Profiles hop off, then bounce right back.
Ports tucked in, cache hums with cheer,
Compose sings build — the services steer.
Carrot crumbs, containers clear. 🥕🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-default-docker-profile

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

This allows users to choose their preferred profile (backend, full, etc.) rather than
assuming they always want the full profile for error recovery.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
archon-ui-main/src/components/BackendStartupError.tsx (1)

52-52: Avoid placeholders in copy-paste commands; use the canonical profile name.

Users will copy this command verbatim. "YOUR_PROFILE" will fail with an unknown profile error. Given compose defines "full", use that explicitly (and keep the note below). If you later adopt a true default-up behavior, we can revisit.

Apply this diff:

-                  docker compose down && docker compose --profile YOUR_PROFILE up -d
+                  docker compose down && docker compose --profile full up -d
docker-compose.yml (1)

14-14: Adding “default” to profiles doesn’t make services start by default; consider removing it or standardizing on full.

The extra default label is redundant and risks implying special behavior that doesn’t exist. Prefer a single canonical “full” profile and accurate docs, or require --profile default explicitly if you keep it. For a true no-flag experience, use COMPOSE_PROFILES=full in the environment or a wrapper script/Make target. (docs.docker.com)

Minimal cleanup (remove default from each service):

-    profiles: ["backend", "full", "default"]
+    profiles: ["backend", "full"]
-    profiles: ["frontend", "full", "default"]
+    profiles: ["frontend", "full"]

Alternative operational options (no code change required):

  • Document COMPOSE_PROFILES=full docker compose up -d for “start everything by default”. (docs.docker.com)
  • Provide make up that runs docker compose --profile full up -d.

If you still want a concept of “default”, ensure the UI and README consistently show --profile full (or --profile default) everywhere, and do not claim that plain docker compose up starts all. (docs.docker.com)

Also applies to: 69-69, 114-114, 149-149

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 86dd1b0 and 140bca2.

📒 Files selected for processing (2)
  • archon-ui-main/src/components/BackendStartupError.tsx (1 hunks)
  • docker-compose.yml (4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
{python/**/*.py,archon-ui-main/src/**/*.{ts,tsx,js,jsx}}

📄 CodeRabbit inference engine (CLAUDE.md)

{python/**/*.py,archon-ui-main/src/**/*.{ts,tsx,js,jsx}}: Remove dead code immediately; do not keep legacy/unused functions
Avoid comments that reference change history (e.g., LEGACY, CHANGED, REMOVED); keep comments focused on current functionality

Files:

  • archon-ui-main/src/components/BackendStartupError.tsx
archon-ui-main/src/components/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place reusable UI components in archon-ui-main/src/components/

Files:

  • archon-ui-main/src/components/BackendStartupError.tsx

Comment thread docker-compose.yml Outdated
- Remove profile restrictions from all services so they start with 'docker compose up'
- All services now run by default without requiring --profile flags
- Profile functionality removed - users now use default behavior only
- This enables the requested 'docker compose up --build -d' workflow
- Change from generic YOUR_PROFILE to specific 'full' profile
- Add note explaining users can replace 'full' if needed
- Maintains clarity while providing flexibility for different profiles
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
docker-compose.yml (1)

2-9: Update Docker Compose header comments to reflect actual behavior

The current comments imply the existence of backend, frontend, and full profiles, but no service in this repository declares a profiles: key. As a result, invoking docker compose --profile <name> has no effect. Please replace the header block with language that accurately describes how profiles work and how to add them if desired.

Apply this doc-only diff:

@@ docker-compose.yml
-# Docker Compose Profiles Strategy:
-# - No profile: All services start by default when running 'docker compose up'
-# - "backend": Starts only backend services (server, mcp, agents) for hybrid development
-# - "frontend": Starts only the frontend UI service  
-# - "full": Starts all services for complete Docker deployment (same as no profile)
-# Use --profile flag to control which services start:
-#   docker compose up                      # All services (default behavior)
-#   docker compose --profile backend up    # Backend only for hybrid dev
-#   docker compose --profile full up       # Everything in Docker (same as default)
+# Docker Compose behavior overview:
+# - No service profiles are defined in this file, so `docker compose up` starts every service by default.
+# - To enable selective service startup (e.g., `backend`, `frontend`, `full`), add `profiles: ["<name>"]` 
+#   under each service and use:
+#     docker compose --profile <name> up
+#   or set the COMPOSE_PROFILES environment variable:
+#     COMPOSE_PROFILES=<name> docker compose up
🧹 Nitpick comments (1)
docker-compose.yml (1)

4-4: YAML lint: trailing spaces

Line 4 has trailing spaces which triggers YAMLlint’s trailing-spaces rule. Remove the extra spaces at the end of the line.

-# - "frontend": Starts only the frontend UI service  
+# - "frontend": Starts only the frontend UI service
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 140bca2 and 61f60a5.

📒 Files selected for processing (1)
  • docker-compose.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-21T11:22:33.541Z
Learnt from: CR
PR: coleam00/Archon#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-21T11:22:33.541Z
Learning: Applies to archon-ui-main/test/** : Place frontend tests under archon-ui-main/test/

Applied to files:

  • docker-compose.yml
🪛 YAMLlint (1.37.1)
docker-compose.yml

[error] 4-4: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Backend Tests (Python + pytest)
🔇 Additional comments (1)
docker-compose.yml (1)

11-167: Profiles referenced in PR description don’t exist in this file; reconcile intent vs. implementation

The PR description claims a “default” profile was added to all services and that backend/frontend/full profiles are preserved. In this compose file, no service declares any profiles: key at all. That implementation is fine if the goal is “docker compose up starts everything,” but it contradicts the stated preservation of profile-based workflows.

Please confirm intended behavior:

  • If you want default “start everything” and do not need profiles: keep the current file and update PR text/docs accordingly (preferred for simplicity).
  • If you must preserve selectable profiles: reintroduce profiles: per service and drop the expectation that docker compose up starts everything without --profile (or require COMPOSE_PROFILES=full). There is no special built-in “default” profile in Compose.

@TimothiousAI
Copy link
Copy Markdown
Collaborator

@leex279 Opened follow-up PR #443 with copy-safe modal/README tweak. Happy to close #443 if you’d prefer to accept this as an inline suggestion here.

- Update error modal to show default 'docker compose up --build -d' command
- Add better organized note structure with bullet points
- Include profile-specific fallback example for existing users
- Update README Quick Start to show default command first
- Maintain backward compatibility guidance for profile users
@leex279
Copy link
Copy Markdown
Collaborator Author

leex279 commented Aug 22, 2025

@TimothiousAI thx, I merged your changes into this. please check if it ok

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
README.md (1)

80-85: Label profile-based commands as optional in docs

To avoid confusion now that no profile is required by default, update all README examples to show the default command first, then the profile-based variant labeled explicitly as optional.

Affected locations:

  • README.md lines 80–85 (Quick Start “docker compose” snippet)
  • “🔄 Database Reset → Restart Services” snippet (around line 127)
  • “After changing hostname or ports” instructions (around line 328)

Suggested diffs:

  1. Quick Start snippet (README.md 80–85)
     ```bash
     docker compose up --build -d
  • or, to match a previously used explicit profile:

  • Optional: if you previously used an explicit profile and want to keep using it:

    docker compose --profile full up --build -d

    or

    make dev-docker # (Alternative: Requires make installed )

2. Database Reset → Restart Services (around line 127)  
```diff
 3. **Restart Services**:

 ```bash
-   docker compose --profile full up -d
+   docker compose up -d
+   # Optional: if you previously used an explicit profile and want to keep using it:
+   docker compose --profile full up -d
 ```
  1. After changing hostname or ports (around line 328)
     1. Restart Docker containers: 
  •  `docker compose down && docker compose --profile full up -d`
    
  •  `docker compose down && docker compose up -d`
    
  •  # Optional: if you previously used an explicit profile and want to keep using it:
    
  •  `docker compose down && docker compose --profile full up -d`
    
    
    
archon-ui-main/src/components/BackendStartupError.tsx (1)

54-61: Make the profile note optional and improve semantics (ul/li) for accessibility

Since profiles are removed from docker-compose.yml, keep the example but mark it as optional for users who previously started with a profile. Also, replace pseudo-bullets with a list for better semantics.

-                <div className="text-red-300 text-xs mt-2">
-                  <p>Note:</p>
-                  <p>• Use 'down' and 'up' (not 'restart') so new env vars are picked up.</p>
-                  <p>• If you originally started with a specific profile (backend, frontend, or full),</p>
-                  <p>&nbsp;&nbsp;run the same profile again:</p>
-                  <br />
-                  <code className="bg-black/50 px-1 rounded">docker compose --profile full up --build -d</code>
-                </div>
+                <div className="text-red-300 text-xs mt-2">
+                  <p className="font-semibold">Note:</p>
+                  <ul className="list-disc list-inside space-y-1">
+                    <li>
+                      Use <code className="bg-black/50 px-1 rounded">down</code> then{" "}
+                      <code className="bg-black/50 px-1 rounded">up</code> (not{" "}
+                      <code className="bg-black/50 px-1 rounded">restart</code>) so new env vars are picked up.
+                    </li>
+                    <li className="mt-1">
+                      Optional: if you previously used an explicit profile, you can still pass it:
+                      <div className="mt-1">
+                        <code className="bg-black/50 px-1 rounded">docker compose --profile full up --build -d</code>
+                      </div>
+                    </li>
+                  </ul>
+                </div>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d9d7287 and 657c7f4.

📒 Files selected for processing (2)
  • README.md (1 hunks)
  • archon-ui-main/src/components/BackendStartupError.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
{python/**/*.py,archon-ui-main/src/**/*.{ts,tsx,js,jsx}}

📄 CodeRabbit inference engine (CLAUDE.md)

{python/**/*.py,archon-ui-main/src/**/*.{ts,tsx,js,jsx}}: Remove dead code immediately; do not keep legacy/unused functions
Avoid comments that reference change history (e.g., LEGACY, CHANGED, REMOVED); keep comments focused on current functionality

Files:

  • archon-ui-main/src/components/BackendStartupError.tsx
archon-ui-main/src/components/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place reusable UI components in archon-ui-main/src/components/

Files:

  • archon-ui-main/src/components/BackendStartupError.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Backend Tests (Python + pytest)
🔇 Additional comments (1)
archon-ui-main/src/components/BackendStartupError.tsx (1)

52-52: Good call adding --build to the recovery command

This makes the guidance more reliable when env or code changed.

@leex279 leex279 requested a review from TimothiousAI August 24, 2025 19:11
@Wirasm Wirasm merged commit 6a1b030 into main Aug 25, 2025
8 checks passed
@Wirasm Wirasm deleted the fix-default-docker-profile branch August 25, 2025 07:35
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.

3 participants