From 4deeedf74baddf98c2b51622a2ceacb9e2069b60 Mon Sep 17 00:00:00 2001 From: zeus Date: Fri, 19 Nov 2021 23:47:41 +0200 Subject: [PATCH] add pm2 --- playground-client/install-npm.sh | 7 +++++++ playground-client/playground.config.js | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 playground-client/install-npm.sh create mode 100644 playground-client/playground.config.js diff --git a/playground-client/install-npm.sh b/playground-client/install-npm.sh new file mode 100755 index 0000000..8e63ffa --- /dev/null +++ b/playground-client/install-npm.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +npm i +npm cache clean --force +cp VuetableCssConfig.js node_modules/vuetable-2/src/components +cp playground.config.js /home/node +pm2-runtime /home/node/playground.config.js diff --git a/playground-client/playground.config.js b/playground-client/playground.config.js new file mode 100644 index 0000000..1a95c46 --- /dev/null +++ b/playground-client/playground.config.js @@ -0,0 +1,20 @@ +module.exports = { + "apps": [{ + "name" : "playground-nodejs", + "autorestart" : true, + "watch" : true, + "script" : "npm", + "args" : "serve", + "pid_file" : "/home/node/pid.pid", + "log_type" : "json", + "log_file" : "/home/node/logfile", + "error_file" : "/home/node/errorfile", + "out_file" : "/home/node/outfile", + "log_date_format": "YYYY-MM-DD HH:mm Z", + "merge_logs" : true, +// "exec_mode" : "fork", + "max_restarts": 10, + "max_memory_restart": "500M", + "restart_delay": 1000 + }] +}