chore: 完善生产发布与部署校验
This commit is contained in:
1 parent
048c42207c
commit
5c6ad02f46
18 files changed
+1013
-47
No files matched your search
@@ -0,0 +1,31 @@
|
||||
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,
|
||||
},
|
||||
{
|
||||
name: "personal-brand-admin-static",
|
||||
cwd: path.join(root, "current"),
|
||||
script: "deploy/static-server.mjs",
|
||||
interpreter: process.execPath,
|
||||
env: { NODE_ENV: "production", ADMIN_STATIC_PORT: "3010" },
|
||||
autorestart: true,
|
||||
restart_delay: 2000,
|
||||
max_restarts: 10,
|
||||
time: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in new issue
Block a user