update 26.8.11
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# =========================================================
|
||||
# OpenClaw Docker deployment
|
||||
# =========================================================
|
||||
|
||||
# Official image
|
||||
OPENCLAW_IMAGE=ghcr.io/openclaw/openclaw:latest-browser
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Host paths
|
||||
# ---------------------------------------------------------
|
||||
OPENCLAW_CONFIG_DIR=/volume2/docker/docker_projects/openclaw/data
|
||||
OPENCLAW_WORKSPACE_DIR=/volume2/docker/docker_projects/openclaw/data/workspace
|
||||
OPENCLAW_AUTH_PROFILE_SECRET_DIR=/volume2/docker/docker_projects/openclaw/auth
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Gateway
|
||||
# ---------------------------------------------------------
|
||||
OPENCLAW_GATEWAY_PORT=2800
|
||||
OPENCLAW_BRIDGE_PORT=2879
|
||||
|
||||
# Docker deployment should normally use LAN bind
|
||||
OPENCLAW_GATEWAY_BIND=lan
|
||||
|
||||
# Generate a long random value on the server.
|
||||
# Example:
|
||||
# head -c 32 /dev/urandom | od -An -tx1 | tr -d ' \n'
|
||||
OPENCLAW_GATEWAY_TOKEN=CHANGE_ME_TO_A_LONG_RANDOM_TOKEN
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Timezone
|
||||
# ---------------------------------------------------------
|
||||
OPENCLAW_TZ=Asia/Shanghai
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Optional provider keys
|
||||
# Add only the providers you actually use.
|
||||
# ---------------------------------------------------------
|
||||
|
||||
# OPENAI_API_KEY=
|
||||
# ANTHROPIC_API_KEY=
|
||||
# DEEPSEEK_API_KEY=
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Optional Telegram
|
||||
# Better added later when we configure the Butler Agent.
|
||||
# ---------------------------------------------------------
|
||||
|
||||
# TELEGRAM_BOT_TOKEN=
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Optional
|
||||
# Usually leave empty/default
|
||||
# ---------------------------------------------------------
|
||||
|
||||
OPENCLAW_DISABLE_BONJOUR=1
|
||||
OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=
|
||||
@@ -0,0 +1,129 @@
|
||||
services:
|
||||
openclaw-gateway:
|
||||
image: ${OPENCLAW_IMAGE}
|
||||
container_name: openclaw-gateway
|
||||
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
environment:
|
||||
HOME: /home/node
|
||||
OPENCLAW_HOME: /home/node
|
||||
TERM: xterm-256color
|
||||
|
||||
# Container-side paths should stay fixed.
|
||||
OPENCLAW_STATE_DIR: /home/node/.openclaw
|
||||
OPENCLAW_CONFIG_PATH: /home/node/.openclaw/openclaw.json
|
||||
OPENCLAW_CONFIG_DIR: /home/node/.openclaw
|
||||
OPENCLAW_WORKSPACE_DIR: /home/node/.openclaw/workspace
|
||||
|
||||
OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN}
|
||||
OPENCLAW_ALLOW_INSECURE_PRIVATE_WS: ${OPENCLAW_ALLOW_INSECURE_PRIVATE_WS:-}
|
||||
OPENCLAW_DISABLE_BONJOUR: ${OPENCLAW_DISABLE_BONJOUR:-1}
|
||||
|
||||
TZ: ${OPENCLAW_TZ:-Asia/Shanghai}
|
||||
|
||||
volumes:
|
||||
# Main OpenClaw persistent state
|
||||
- ${OPENCLAW_CONFIG_DIR}:/home/node/.openclaw
|
||||
|
||||
# Explicit workspace mount
|
||||
- ${OPENCLAW_WORKSPACE_DIR}:/home/node/.openclaw/workspace
|
||||
|
||||
# Auth/profile secrets
|
||||
- ${OPENCLAW_AUTH_PROFILE_SECRET_DIR}:/home/node/.config/openclaw
|
||||
|
||||
ports:
|
||||
- "${OPENCLAW_GATEWAY_PORT:-2800}:18789"
|
||||
- "${OPENCLAW_BRIDGE_PORT:-2879}:18790"
|
||||
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
cap_drop:
|
||||
- NET_RAW
|
||||
- NET_ADMIN
|
||||
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
init: true
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
command:
|
||||
[
|
||||
"node",
|
||||
"dist/index.js",
|
||||
"gateway",
|
||||
"--bind",
|
||||
"${OPENCLAW_GATEWAY_BIND:-lan}",
|
||||
"--port",
|
||||
"18789"
|
||||
]
|
||||
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"node",
|
||||
"dist/docker-healthcheck.js"
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
|
||||
openclaw-cli:
|
||||
image: ${OPENCLAW_IMAGE}
|
||||
container_name: openclaw-cli
|
||||
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
network_mode: "service:openclaw-gateway"
|
||||
|
||||
environment:
|
||||
HOME: /home/node
|
||||
OPENCLAW_HOME: /home/node
|
||||
TERM: xterm-256color
|
||||
|
||||
OPENCLAW_STATE_DIR: /home/node/.openclaw
|
||||
OPENCLAW_CONFIG_PATH: /home/node/.openclaw/openclaw.json
|
||||
OPENCLAW_CONFIG_DIR: /home/node/.openclaw
|
||||
OPENCLAW_WORKSPACE_DIR: /home/node/.openclaw/workspace
|
||||
|
||||
OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN}
|
||||
OPENCLAW_ALLOW_INSECURE_PRIVATE_WS: ${OPENCLAW_ALLOW_INSECURE_PRIVATE_WS:-}
|
||||
|
||||
BROWSER: echo
|
||||
TZ: ${OPENCLAW_TZ:-Asia/Shanghai}
|
||||
|
||||
volumes:
|
||||
- ${OPENCLAW_CONFIG_DIR}:/home/node/.openclaw
|
||||
- ${OPENCLAW_WORKSPACE_DIR}:/home/node/.openclaw/workspace
|
||||
- ${OPENCLAW_AUTH_PROFILE_SECRET_DIR}:/home/node/.config/openclaw
|
||||
|
||||
cap_drop:
|
||||
- NET_RAW
|
||||
- NET_ADMIN
|
||||
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
stdin_open: true
|
||||
tty: true
|
||||
init: true
|
||||
|
||||
entrypoint:
|
||||
[
|
||||
"node",
|
||||
"dist/index.js"
|
||||
]
|
||||
|
||||
depends_on:
|
||||
- openclaw-gateway
|
||||
|
||||
profiles:
|
||||
- cli
|
||||
Reference in New Issue
Block a user