Skip to content

feat & refactor: Integrate OpenClaw for Site 2 and standardize env files - #67

Closed
Farhan-Abbas wants to merge 1 commit into
denoslab:mainfrom
Farhan-Abbas:site-2-openclaw-add
Closed

Farhan-Abbas wants to merge 1 commit into
denoslab:mainfrom
Farhan-Abbas:site-2-openclaw-add

Conversation

@Farhan-Abbas

Copy link
Copy Markdown
Collaborator

Solves #66

This PR adds the necessary orchestration and configuration to spin up an isolated OpenClaw LLM agent for Site 2, and performs a codebase-wide standardization of .env and .env template files.

Changes Included:

  • Added OpenClaw to Site 2 Stack:

    • Updated docker-compose.site2.yml with openclaw-site2 and openclaw-site2-perms services.
    • Added port mappings (18790:18789) and WebSocket allowed origins to prevent isolation clashes with the main workbench stack.
    • Created openclaw.site2.example.env as a base reference point for Site 2's agent.
  • Environment File Standardization:

    • Renamed hidden configuration templates to use cleaner, trailing extensions (.env.example -> example.env, .env.site2 -> site2.env, openclaw.env.example -> openclaw.example.env).
    • Scaffolded site2.example.env to improve the developer onboarding experience for multi-site local workflows.
    • Updated .gitignore.
    • Updated README.md and cli.md examples highlighting the STARFISH_ENV=site2.env usage.
    • Updated all relevant CLI tool definitions and Python tests (test_agent.py, test_tools.py) to pass and assert the refactored .env paths.

…Site 2

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings May 26, 2026 05:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an isolated OpenClaw service to the Site 2 controller docker-compose stack and updates the CLI/docs/tests to use the new standardized env filename (site2.env) for multi-site workflows.

Changes:

  • Extend controller/docker-compose.site2.yml with openclaw-site2 (+ perms init service), distinct port mapping, and allowed origins.
  • Add/rename environment templates for controller and OpenClaw, and update docs/examples/tests to reference STARFISH_ENV=site2.env.
  • Update CLI agent tool schema/prompt text and .gitignore to reflect the new env naming.

Reviewed changes

Copilot reviewed 10 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
workbench/config/openclaw.example.env Adds an OpenClaw env template for the workbench stack.
docs/cli.md Updates CLI docs examples to use STARFISH_ENV=site2.env.
controller/example.env Adds the controller env template in the new standardized name.
controller/site2.example.env Adds Site 2 controller env template.
controller/site2.env Adds a concrete Site 2 controller env file (currently includes a real-looking password).
controller/openclaw.site2.example.env Adds Site 2 OpenClaw env template.
controller/docker-compose.site2.yml Switches Site 2 env_file naming and adds OpenClaw services for Site 2.
cli/tests/test_tools.py Updates tests to pass/assert site2.env.
cli/tests/test_agent.py Updates agent test to pass site2.env in tool calls.
cli/starfish_cli/agent/tools.py Updates tool schema description example from .env.site2 to site2.env.
cli/starfish_cli/agent/prompts.py Updates prompt text example from .env.site2 to site2.env.
cli/README.md Updates multi-site workflow examples to use STARFISH_ENV=site2.env.
cli/.gitignore Updates ignored multi-site env filename from .env.site2 to site2.env.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread controller/openclaw.site2.example.env
Comment thread cli/.gitignore
Comment on lines 1 to 4
# Environment files — contain sensitive credentials, never commit these
.env
.env.site2
site2.env

Comment on lines 14 to 18
ports:
- '8002:8000'
env_file:
- .env.site2
- site2.env
command: bash -c "cron && python3 manage.py runserver 0.0.0.0:8000"
Comment on lines +98 to +103
- '18790:18789'
env_file:
- openclaw.site2.env
environment:
OPENCLAW_CONTROL_UI_ALLOWED_ORIGINS: "http://localhost:18790,http://127.0.0.1:18790,ws://localhost:18790,ws://127.0.0.1:18790"
PYTHONPATH: /home/node/.openclaw/workspace/starfish-cli
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.

2 participants