Skip to content

安装 deploy-server ​

本页走最短路径:从源码构建单二进制并本机启动。生产形态(systemd / Docker / 反向代理)见 服务端章。

构建顺序 ​

前端构建 → 拷贝前端产物进 embed 目录 → 编译 Go。顺序颠倒会得到占位网页(deploy doctor 的 web.built 可检查)。

Linux / macOS ​

bash
cd deploy-server-ui
pnpm install
pnpm build
cd ../deploy-server
make ui        # 拷贝 dist 到 internal/web/dist
make build     # 或 make run 直接前台运行

Windows ​

powershell
cd deploy-server-ui
pnpm.cmd install
pnpm.cmd build
cd ..\deploy-server
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\build.ps1 -Local

build.ps1 默认产出 bin/deploy-server-linux-amd64;-Local 追加产出 bin/deploy-server.exe;-Version <v> 注入版本;-SkipUI 复用已嵌入前端。

启动 ​

bash
./bin/deploy-server -listen 127.0.0.1:10055 -data-dir ./data -web-root ./workspaces
参数含义默认
-listen监听地址127.0.0.1:10055
-data-dir数据库、密钥、日志目录data
-web-root项目工作区根目录workspaces
-config配置文件路径见 启动参数与配置文件
-server-url注入脚本的外部访问地址按 listen 推导

验证 ​

bash
curl -fsS http://127.0.0.1:10055/api/v1/healthz

返回 status、version、uptimeSec 即服务正常。浏览器打开 http://127.0.0.1:10055 应看到初始化页(而非占位页)。

下一步 ​

安装 deploy-cli,然后 初始化与登录。