update 26.8.21

This commit is contained in:
kun
2026-08-21 10:59:47 +08:00
parent 646f8d10a8
commit fbbc5b7047
5 changed files with 23 additions and 134 deletions
-13
View File
@@ -1,13 +0,0 @@
OPENCLAW_IMAGE=ghcr.io/openclaw/openclaw:latest
# OpenClaw 内部 Gateway 端口
OPENCLAW_GATEWAY_PORT=18789
# Bridge 内部端口
OPENCLAW_BRIDGE_PORT=18790
OPENCLAW_GATEWAY_BIND=lan
OPENCLAW_GATEWAY_TOKEN=fV3cYPabGURAEH
OPENCLAW_TZ=Asia/Shanghai
-113
View File
@@ -1,113 +0,0 @@
services:
openclaw-gateway:
image: ${OPENCLAW_IMAGE:-ghcr.io/openclaw/openclaw:latest}
container_name: openclaw-gateway
# 你的 /volume2 无法正常 chown 给 UID 1000,
# 因此当前环境用 root 运行,解决持久化目录写权限问题
user: "0:0"
env_file:
- .env
environment:
TZ: ${OPENCLAW_TZ:-Asia/Shanghai}
HOME: /root
OPENCLAW_HOME: /root
TERM: xterm-256color
OPENCLAW_STATE_DIR: /root/.openclaw
OPENCLAW_CONFIG_PATH: /root/.openclaw/openclaw.json
OPENCLAW_CONFIG_DIR: /root/.openclaw
OPENCLAW_WORKSPACE_DIR: /root/.openclaw/workspace
# OpenClaw 内部始终认 18789
OPENCLAW_GATEWAY_PORT: "18789"
OPENCLAW_GATEWAY_BIND: ${OPENCLAW_GATEWAY_BIND:-lan}
OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN}
volumes:
# 所有长期数据统一持久化
- /volume2/docker/docker_projects/openclaw/data:/root/.openclaw
ports:
# 宿主机 Web UI 2800 -> 容器 Gateway 18789
- "2800:18789"
# 如果你希望 Bridge 外部仍用 2799
- "2799:18790"
extra_hosts:
- "host.docker.internal:host-gateway"
init: true
restart: unless-stopped
command:
[
"node",
"dist/index.js",
"gateway",
"--bind",
"lan",
"--port",
"18789"
]
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:18789/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
]
interval: 30s
timeout: 5s
retries: 5
start_period: 20s
openclaw-cli:
image: ${OPENCLAW_IMAGE:-ghcr.io/openclaw/openclaw:latest}
container_name: openclaw-cli
user: "0:0"
env_file:
- .env
# 官方 Compose 就是让 CLI 与 Gateway 共用 network namespace
network_mode: "service:openclaw-gateway"
environment:
TZ: ${OPENCLAW_TZ:-Asia/Shanghai}
HOME: /root
OPENCLAW_HOME: /root
TERM: xterm-256color
BROWSER: echo
OPENCLAW_STATE_DIR: /root/.openclaw
OPENCLAW_CONFIG_PATH: /root/.openclaw/openclaw.json
OPENCLAW_CONFIG_DIR: /root/.openclaw
OPENCLAW_WORKSPACE_DIR: /root/.openclaw/workspace
OPENCLAW_GATEWAY_PORT: "18789"
OPENCLAW_GATEWAY_BIND: ${OPENCLAW_GATEWAY_BIND:-lan}
OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN}
volumes:
- /volume2/docker/docker_projects/openclaw/data:/root/.openclaw
stdin_open: true
tty: true
init: true
entrypoint:
- node
- dist/index.js
depends_on:
- openclaw-gateway
+11
View File
@@ -0,0 +1,11 @@
services:
sonovel:
image: ghcr.io/freeok/sonovel:latest
container_name: sonovel
ports:
- "2800:7765"
environment:
JAVA_OPTS: "-Dmode=web"
volumes:
- /volume2/docker/docker_projects/sonovel_data:/sonovel
restart: unless-stopped