Skip to content

Commit 8fbbb37

Browse files
committed
Add pm2 script
1 parent cafe9d6 commit 8fbbb37

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

deploy.config.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"apps": [
3+
{
4+
"name": "ssr",
5+
"script": "./dist/server.js",
6+
"instances": 2,
7+
"exec_mode": "cluster",
8+
"env": {
9+
"NODE_PATH": "src"
10+
}
11+
}
12+
]
13+
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@
168168
"test": "node scripts/test.js",
169169
"upload:s3": "aws s3 sync ./build s3://$S3_BUCKET --delete",
170170
"upload:ssr": "aws s3 sync ./build s3://$S3_BUCKET_SSR",
171-
"download": "aws s3 cp s3://$S3_BUCKET ./build/ --recursive && aws s3 cp s3://$S3_BUCKET_SSR ./dist/ --recursive"
171+
"download": "aws s3 cp s3://$S3_BUCKET ./build/ --recursive && aws s3 cp s3://$S3_BUCKET_SSR ./dist/ --recursive",
172+
"deploy": "pm2 reload deploy.config.json"
172173
},
173174
"eslintConfig": {
174175
"extends": [

0 commit comments

Comments
 (0)