openclaw/docker-compose.phala.yml
HashWarlock 3c4f74a337 chore: update docker-compose and entrypoint script for directory structure changes
- Changed CLAWDBOT_STATE_DIR and CLAWDBOT_WORKSPACE_DIR paths from /data to /home/node for improved organization.
- Updated GATEWAY_BIND default value from loopback to lan for broader accessibility.
- Adjusted volume mappings in docker-compose for consistency with new directory structure.
- Modified entrypoint script to reflect updated directory paths and ensure proper setup.
2026-01-26 22:26:08 -06:00

54 lines
1.9 KiB
YAML

# Clawdbot on Phala Cloud CVM
# Deploy with: docker compose -f docker-compose.phala.yml up -d
#
# Access the web UI at http://<DSTACK_APP_ID>-18789.<DSTACK_GATEWAY_URL>
# Configure channels and API keys via /setup (password protected)
#
# If REDPILL_API_KEY is set, the container auto-configures Redpill
# as the default provider on first boot.
services:
clawdbot:
# Comment out if using pre-built image
build:
context: .
dockerfile: Dockerfile
image: hashwarlock/clawdbot:redpill
environment:
HOME: /home/node
TERM: xterm-256color
# Redpill API key - auto-configures provider on first boot
REDPILL_API_KEY: ${REDPILL_API_KEY:-}
# Channel tokens - auto-configures channels on first boot
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-}
DISCORD_BOT_TOKEN: ${DISCORD_BOT_TOKEN:-}
# Pre-approved user IDs (optional, comma-separated)
TELEGRAM_ALLOWED_USERS: ${TELEGRAM_ALLOWED_USERS:-}
DISCORD_ALLOWED_USERS: ${DISCORD_ALLOWED_USERS:-}
# Gateway configuration
GATEWAY_BIND: ${GATEWAY_BIND:-lan}
GATEWAY_PORT: ${GATEWAY_PORT:-18789}
GATEWAY_AUTH: ${GATEWAY_AUTH:-off}
GATEWAY_TOKEN: ${GATEWAY_TOKEN:-}
GATEWAY_PASSWORD: ${GATEWAY_PASSWORD:-}
# Persistence paths inside container
CLAWDBOT_STATE_DIR: /home/node/.clawdbot
CLAWDBOT_WORKSPACE_DIR: /home/node/clawd
volumes:
# Persistent storage for credentials, agents, sessions
- clawdbot-data:/home/node
# Host network mode: container shares CVM's network stack
# Gateway binds to LAN (0.0.0.0) by default, accessible via dstack proxy
network_mode: host
restart: unless-stopped
user: root
command: >
bash -c "
mkdir -p /home/node/.clawdbot /home/node/clawd &&
chown -R node:node /home/node &&
su node -c '/bin/bash /app/scripts/docker-entrypoint-phala.sh'
"
volumes:
clawdbot-data: