fix: 分离日常发布与首次初始化(09-09-existing-deploy-seed-separation)
这个提交包含在:
@@ -78,12 +78,12 @@ const deploymentInjectedEnvKeys = new Set(['BUILD_SHA']);
|
||||
const allowedOverrides = {
|
||||
server: ['NODE_ENV', 'BUILD_SHA'],
|
||||
worker: ['NODE_ENV', 'BUILD_SHA', 'SERVE_CLIENT_DIST', 'JOBS_ENABLED'],
|
||||
init: ['NODE_ENV', 'BUILD_SHA'],
|
||||
init: ['NODE_ENV', 'BUILD_SHA', 'DEPLOY_DATA_MODE'],
|
||||
};
|
||||
const requiredRuntimeOverrides = {
|
||||
server: ['BUILD_SHA'],
|
||||
worker: ['BUILD_SHA'],
|
||||
init: ['BUILD_SHA'],
|
||||
init: ['BUILD_SHA', 'DEPLOY_DATA_MODE'],
|
||||
};
|
||||
const requiredBuildArgs = {
|
||||
server: ['BUILD_SHA', 'VITE_BUILD_SHA'],
|
||||
@@ -389,6 +389,11 @@ for (const serviceName of requiredServices) {
|
||||
}
|
||||
}
|
||||
|
||||
const initBlock = extractServiceBlock(composeContent, 'init');
|
||||
if (!initBlock || !initBlock.includes(' DEPLOY_DATA_MODE: ${DEPLOY_DATA_MODE:-}')) {
|
||||
errors.push('init 的 DEPLOY_DATA_MODE 必须显式传入,缺失时为空,禁止默认初始化');
|
||||
}
|
||||
|
||||
const serverBlock = extractServiceBlock(composeContent, 'server');
|
||||
if (!serverBlock || !/^\s{6}-\s*["']127\.0\.0\.1:\$\{APP_HOST_PORT:-3000\}:3000["']\s*$/m.test(serverBlock)) {
|
||||
errors.push('服务 server 必须通过 APP_HOST_PORT 将容器 3000 端口只绑定到宿主回环地址');
|
||||
|
||||
在新工单中引用
屏蔽一个用户