diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 2693cf8..6a30b17 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -146,12 +146,18 @@ async function main() { console.log(` 端口: ${options.port}`); console.log(` EIP 带宽: ${options.eipBandwidth} Mbps`); + // 构建环境变量 - 从当前 .env 读取关键配置注入容器 + const containerEnv: Record = { + ANTHROPIC_BASE_URL: process.env.ANTHROPIC_BASE_URL || 'https://api.anthropic.com', + }; + const result = await deployProxy({ name, image, replicas: options.replicas, port: options.port, eipBandwidth: options.eipBandwidth, + env: containerEnv, }); if (result.success) { diff --git a/src/deploy.ts b/src/deploy.ts index 0c44a73..b51db1d 100644 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -91,6 +91,8 @@ export async function deployProxy(params: DeployProxyParams): Promise