chore(deploy): 完善 lotteryfront 单机部署流程
Some checks failed
lotteryfront CI / build (push) Has been cancelled

This commit is contained in:
2026-07-07 15:32:03 +08:00
parent 396b3c47de
commit a86e8a2c67
4 changed files with 28 additions and 5 deletions

View File

@@ -3,8 +3,8 @@
* 玩家端lotteryfront宝塔 PM2 配置
*
* 部署步骤(在服务器项目目录执行):
* 1. 复制 .env.example .env按线上域名填写见下方 env 说明)
* 2. npm ci && npm run build
* 1. 本地 npm run build打包 .next/standalone + .next/static + public 上传服务器
* 2. 服务器:复制 .env.example 为 .env按线上域名填写见下方 env 说明)
* 3. 修改下方 cwd 为服务器上的实际路径
* 4. pm2 start ecosystem.config.cjs
* 5. pm2 save && pm2 startup # 开机自启(按 PM2 提示执行)
@@ -23,8 +23,7 @@ module.exports = {
{
name: "lotteryfront",
cwd: APP_CWD,
script: "node_modules/next/dist/bin/next",
args: "start -p 3800 -H 127.0.0.1",
script: ".next/standalone/server.js",
interpreter: "node",
exec_mode: "fork",
instances: 1,
@@ -38,6 +37,7 @@ module.exports = {
env: {
NODE_ENV: "production",
HOSTNAME: "0.0.0.0",
PORT: "3800",
},