- Updated web UI access URL format in docker-compose file. - Added GATEWAY_BIND environment variable for flexible gateway binding. - Modified entrypoint script to use GATEWAY_BIND variable and ensure proper directory setup and permissions. - Changed user context for executing the entrypoint script for Phala CVM deployment.
54 lines
1.9 KiB
YAML
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:-loopback}
|
|
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: /data/.clawdbot
|
|
CLAWDBOT_WORKSPACE_DIR: /data/workspace
|
|
volumes:
|
|
# Persistent storage for credentials, agents, sessions
|
|
- clawdbot-data:/data
|
|
# Host network mode: container shares CVM's network stack
|
|
# Gateway binds to loopback by default, accessible via CVM's public IP
|
|
network_mode: host
|
|
restart: unless-stopped
|
|
user: root
|
|
command: >
|
|
bash -c "
|
|
mkdir -p /data/.clawdbot /data/workspace &&
|
|
chown -R node:node /data &&
|
|
su node -c '/bin/bash /app/scripts/docker-entrypoint-phala.sh'
|
|
"
|
|
|
|
volumes:
|
|
clawdbot-data:
|