diff --git a/frontend/ecosystem.config.cjs b/frontend/ecosystem.config.cjs index dc53591..5c18756 100644 --- a/frontend/ecosystem.config.cjs +++ b/frontend/ecosystem.config.cjs @@ -23,8 +23,7 @@ module.exports = { repo: process.env.GIT_REPOSITORY, path: process.env.DEPLOY_PATH, 'pre-deploy-local': '', - 'post-deploy': - 'cd frontend && npm install && npm run build && pm2 reload ecosystem.config.cjs', + 'post-deploy': 'sh scripts/startup.sh', 'pre-setup': '' } } diff --git a/frontend/scripts/startup.sh b/frontend/scripts/startup.sh new file mode 100644 index 0000000..405b271 --- /dev/null +++ b/frontend/scripts/startup.sh @@ -0,0 +1,5 @@ +cd frontend && \ +npm install && \ +npm run build && \ +pm2 kill && \ +pm2 start ecosystem.config.cjs \ No newline at end of file