You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
version : '3.8'
services :
db :
image : mysql:8.0
pull_policy : never
container_name : lingshu_db
restart : always
environment :
MYSQL_ROOT_PASSWORD : lingshu123
MYSQL_DATABASE : lingshu
MYSQL_CHARSET : utf8mb4
command : --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --init-connect='SET NAMES utf8mb4'
volumes :
- db_data:/var/lib/mysql
- ./灵枢数据库设计.sql:/docker-entrypoint-initdb.d/01_schema.sql
- ./init_demo_data.sql:/docker-entrypoint-initdb.d/02_data.sql
healthcheck :
test : [ "CMD" , "mysqladmin" , "ping" , "-h" , "localhost" , "-plingshu123" ]
interval : 5s
timeout : 5s
retries : 10
app :
build : .
image : lingshu_app
pull_policy : never
container_name : lingshu_app
restart : always
ports :
- "5000:5000"
environment :
DB_HOST : db
DB_PORT : 3306
DB_USER : root
DB_PASSWORD : lingshu123
DB_NAME : lingshu
# host-gateway 是 Docker 内置域名,指向宿主机(需 Docker 20.10+)
# 若解析失败,将下面两行的 host-gateway 改为宿主机实际 IP, 例如 172.17.0.1
OPENCLAW_URL : http://host-gateway:18789
LINGSHU_CALLBACK_URL : http://host-gateway:5000
# 传输协议: websocket( 默认) 或 http
OPENCLAW_PROTOCOL : websocket
# WebSocket 端点路径,根据 OpenClaw 实际配置调整(常见值:/acp 或 /)
OPENCLAW_WS_PATH : /acp
depends_on :
db :
condition : service_healthy
extra_hosts :
- "host-gateway:host-gateway"
volumes :
db_data :