Rename shared backend to Bedrock [skip ci]
This commit is contained in:
+5
-5
@@ -63,7 +63,7 @@ python3 "$(dirname "$0")/migrate.py"
|
||||
|
||||
# 每次发布使用独立二进制目录供只读挂载;本脚本不清除旧 release 目录。
|
||||
release=$(mktemp -d "$foundry/release.XXXXXXXX")
|
||||
install -m 755 "$1" "$release/foundry"
|
||||
install -m 755 "$1" "$release/bedrock"
|
||||
|
||||
# 容器内监听全部接口供同网络的代理访问;端口 8080 没有在此发布到宿主公网,TLS 由 Traefik 处理。
|
||||
export HOST=0.0.0.0 PORT=8080 PUBLIC_ORIGIN="$origin"
|
||||
@@ -113,7 +113,7 @@ if [[ -d "$codex_dir" ]]; then
|
||||
# 用当前 release 的同一份 Go 二进制启动 worker,避免 Core/worker 的画布产物协议不一致。
|
||||
# 目录探测只验证 socket 和非空模型目录,不执行一次真实生成,也不验证模型账户额度。
|
||||
worker_ready=false
|
||||
if bash "$(dirname "$0")/codex-worker.sh" "$release/foundry" >/dev/null; then
|
||||
if bash "$(dirname "$0")/codex-worker.sh" "$release/bedrock" >/dev/null; then
|
||||
for attempt in {1..20}; do
|
||||
if docker exec foundry-codex-worker node -e '
|
||||
const http = require("node:http");
|
||||
@@ -157,7 +157,7 @@ if [[ -d "$codex_dir" ]]; then
|
||||
)
|
||||
fi
|
||||
|
||||
# 使用现成 node 镜像作为运行载体,实际启动 /opt/foundry 这个 Go 可执行文件,不在此 docker build。
|
||||
# 使用现成 node 镜像作为运行载体,实际启动 /opt/bedrock 这个 Go 可执行文件,不在此 docker build。
|
||||
# Node 供就绪探测使用;CA bundle 供 Go 的 HTTPS 客户端使用,二者的证书来源不能混为一谈。
|
||||
# Core 只挂载 IPC/授权表,不挂载 CLI 登录;以非 root、只读根文件系统和裁剪能力运行。
|
||||
docker run -d --name "$candidate" "${codex_mounts[@]}" "${mail_env[@]}" "${slack_env[@]}" "${research_env[@]}" --network "$network" \
|
||||
@@ -167,8 +167,8 @@ docker run -d --name "$candidate" "${codex_mounts[@]}" "${mail_env[@]}" "${slack
|
||||
--read-only --memory 1g \
|
||||
--mount "type=bind,source=$ca_bundle,target=/etc/ssl/certs/ca-certificates.crt,readonly" \
|
||||
-e SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
|
||||
--mount "type=bind,source=$release/foundry,target=/opt/foundry,readonly" \
|
||||
node:24-bookworm-slim /opt/foundry >/dev/null
|
||||
--mount "type=bind,source=$release/bedrock,target=/opt/bedrock,readonly" \
|
||||
node:24-bookworm-slim /opt/bedrock >/dev/null
|
||||
|
||||
# 候选或路由失败时删除本次新 Core;旧 Core 由 route 成功探测后才停止。
|
||||
cleanup_candidate() {
|
||||
|
||||
Reference in New Issue
Block a user