Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
9782e53f
Commit
9782e53f
authored
Sep 28, 2017
by
strong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改启动脚本start.sh,支持环境变量PISNS_INSTANCES_NUMBER
parent
0ffe355e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
start.sh
start.sh
+7
-1
No files found.
start.sh
View file @
9782e53f
pm2 start app.js
--name
=
forum
-i
0
--output
=
./logs/forum.log
--error
=
./logs/forum.err
--log-date-format
=
'YYYY-MM-DD HH:mm:ss'
# pm2 start app.js --name=forum -i 0 --output=./logs/forum.log --error=./logs/forum.err --log-date-format='YYYY-MM-DD HH:mm:ss'
# 通过环境变量 PISCRM_INSTANCES_NUMBER 配置nodejs实例,设置2为启动2实例,设置max为启动最大实例数(等同cpu线程)
instancesNumber
=
${
PISNS_INSTANCES_NUMBER
}
if
[[
!
$instancesNumber
]]
;
then
instancesNumber
=
'2'
fi
pm2 start app.js
--name
=
forum
-i
$instancesNumber
--output
=
./logs/forum.log
--error
=
./logs/forum.err
--log-date-format
=
'YYYY-MM-DD HH:mm:ss'
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment