diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 6a30b17..4de78be 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -15,7 +15,8 @@ */ import { config } from 'dotenv'; -config(); +// 使用 override: true 确保覆盖系统环境变量 +config({ override: true }); import { deployProxy, deleteProxy, getProxyStatus } from '../src/deploy'; diff --git a/src/deploy.ts b/src/deploy.ts index b51db1d..3fb978b 100644 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -3,7 +3,8 @@ */ import { config } from 'dotenv'; -config(); +// 使用 override: true 确保覆盖系统环境变量 +config({ override: true }); import { K8sClient, V1Deployment, V1Ingress, V1IngressRule, V1ServicePort } from './k8s-client';