Skip to content

feat: 优化standalone模式,去掉docker-compose依赖 - #762

Merged
qdaxb merged 1 commit into
mainfrom
update_standalone_mode
Mar 15, 2026
Merged

qdaxb merged 1 commit into
mainfrom
update_standalone_mode

Conversation

@qdaxb

@qdaxb qdaxb commented Mar 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • New Features

    • Standalone deployment now includes embedded Redis in a single container, eliminating external dependencies
    • Added simplified container lifecycle commands for logs, start, stop, and restart operations
    • New environment variable (RUNTIME_SOCKET_DIRECT_URL) for remote access configuration
  • Documentation

    • Updated deployment guides with streamlined installation and command examples for both standalone and standard deployment modes
    • Added common commands section documenting container management operations

@qdaxb
qdaxb merged commit b1c2781 into main Mar 15, 2026
15 of 17 checks passed
@qdaxb
qdaxb deleted the update_standalone_mode branch March 15, 2026 04:02
@coderabbitai

coderabbitai Bot commented Mar 15, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a6d74134-68cd-4b43-9838-0dddecc6d2fb

📥 Commits

Reviewing files that changed from the base of the PR and between 0b730b7 and 85978d2.

📒 Files selected for processing (10)
  • README.md
  • README_zh.md
  • backend/app/services/adapters/task_kinds/operations.py
  • docker-compose.standalone.yml
  • docker/standalone/Dockerfile
  • docker/standalone/start.sh
  • docs/en/deployment/standalone-mode.md
  • docs/zh/deployment/standalone-mode.md
  • install.sh
  • scripts/build-standalone.sh

📝 Walkthrough

Walkthrough

The changes transition the standalone deployment architecture from using external Redis with docker-compose to embedding Redis within a single Docker image. docker-compose.standalone.yml is deleted, while installation and startup scripts are refactored to use direct Docker commands and orchestrate Redis startup alongside other services.

Changes

Cohort / File(s) Summary
Documentation - README
README.md, README_zh.md
Updated Standalone mode command examples from docker-compose to direct Docker CLI commands (logs, stop, start, restart targeting wegent-standalone container). Standard mode heading clarified to indicate multi-container usage.
Standalone Docker Image
docker/standalone/Dockerfile, docker/standalone/start.sh
Integrated Redis as an embedded system package with new environment variables (REDIS_URL, REDIS_DATA_DIR). Extended startup script to initialize Redis, manage persistence, and orchestrate multi-service startup with health checks and graceful shutdown.
Deployment Configuration
docker-compose.standalone.yml
Entire file deleted, removing standalone docker-compose configuration including Redis and backend service definitions, volume declarations, and networking setup.
Installation & Build
install.sh, scripts/build-standalone.sh
Major refactoring of install.sh to support standalone mode alongside standard mode with new orchestration functions (start_standalone_service, wait_for_standalone_service, start_standard_services, wait_for_standard_services) and conditional docker run/docker-compose paths. Updated build-standalone.sh with new container name and removed docker-compose references.
Deployment Documentation
docs/en/deployment/standalone-mode.md, docs/zh/deployment/standalone-mode.md
Comprehensively reworked to document embedded Redis architecture, replaced docker-compose quick start with single-command installation, added common container lifecycle commands section, included embedded Redis configuration details, and updated data persistence/environment variable references.
Backend Service
backend/app/services/adapters/task_kinds/operations.py
Added is_group_chat column to placeholder task insertion schema in create_task_id function.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant StartScript as start.sh
    participant Redis
    participant Database as Database<br/>(SQLite)
    participant Backend
    participant Frontend

    User->>StartScript: Execute startup
    activate StartScript
    
    StartScript->>Redis: Step 1: Initialize & start Redis
    activate Redis
    Redis-->>StartScript: Redis ready (6379)
    
    StartScript->>Database: Step 2: Initialize database
    activate Database
    Database-->>StartScript: Database ready
    deactivate Database
    
    StartScript->>Backend: Step 3: Start Backend service
    activate Backend
    Backend->>Redis: Connect to Redis
    Backend->>Database: Connect to SQLite
    Backend-->>StartScript: Backend health check passed
    
    StartScript->>Frontend: Step 4: Start Frontend service
    activate Frontend
    Frontend->>Backend: Connect to Backend API
    Frontend-->>StartScript: Frontend ready
    
    StartScript-->>User: Step 5: All services started
    deactivate StartScript
    
    Note over Redis,Frontend: Services running with embedded Redis
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

The review requires careful examination of: (1) architectural shift from external to embedded Redis affecting multiple deployment flows, (2) significant refactoring in install.sh with new conditional orchestration logic for two deployment modes, (3) extended startup sequence in start.sh with Redis integration, health checks, and shutdown handling, (4) comprehensive documentation updates across multiple files reflecting the new architecture, and (5) interdependencies between changes across Docker, scripts, and installation logic.

Poem

🐰 A rabbit hops through code with glee,
Redis nestled, cozy and free!
No docker-compose to weigh us down,
One image now—the finest in town!
Standalone mode, simplified and bright,
Embedded Redis shining with might! 🎉

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update_standalone_mode
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant