chore(deploy): add same-host staging stack next to production

dev deploys to /opt/dukang-staging (819x, *-test domains); main deploys to production. Staging uses full Mock with shared WeChat app ids.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-31 11:37:18 +08:00
parent 8d6c0f9ac0
commit 6a23e79f4c
20 changed files with 793 additions and 119 deletions
+2 -1
View File
@@ -4,7 +4,8 @@ const { existsSync } = require('fs');
const { resolve } = require('path');
const apiRoot = resolve(__dirname, '..');
const envFile = process.env.DUKANG_ENV_FILE ?? '.env.production';
const envFile = process.env.DUKANG_ENV_FILE
?? (process.env.APP_ENV === 'staging' ? '.env.staging' : '.env.production');
const envPath = resolve(apiRoot, envFile);
if (!existsSync(envPath)) {