Files
persionalBrand/deploy/ecosystem.config.cjs
T
que01 47a24e0d53
CI / Static checks (push) Has been cancelled
CI / Production build (push) Has been cancelled
CI / API integration (push) Has been cancelled
CI / Browser regression (push) Has been cancelled
chore: 固化一键生产部署流程
2026-10-13 14:56:16 +08:00

21 lines
570 B
JavaScript

const path = require("node:path");
const root = process.env.DEPLOY_ROOT;
if (!root || !path.isAbsolute(root)) throw new Error("DEPLOY_ROOT must be absolute");
module.exports = {
apps: [
{
name: "personal-brand-api",
cwd: path.join(root, "current/apps/api"),
script: "dist/main.js",
interpreter: process.execPath,
node_args: ["--env-file=" + path.join(root, "shared/.env.production")],
env: { NODE_ENV: "production" },
autorestart: true,
restart_delay: 2000,
max_restarts: 10,
time: true,
},
],
};