chore(deploy): 完善 lotteryfront 单机部署流程
Some checks failed
lotteryfront CI / build (push) Has been cancelled
Some checks failed
lotteryfront CI / build (push) Has been cancelled
This commit is contained in:
@@ -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",
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user