works:linux:pm2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
works:linux:pm2 [2022/06/02 04:41]
Chugreev Eugene
works:linux:pm2 [2022/06/02 11:03] (current)
Chugreev Eugene
Line 6: Line 6:
     {     {
       name: "project-name",       name: "project-name",
-      exec_mode: "cluster",+      cwd: "/opt/project-path/", 
 +      exec_mode: "cluster",  // execution model - "fork", "cluster"
       instances: "1",       instances: "1",
-      script: "./server/index.js", // your script +      script: "./server/index.js", // your script  (or executible like "/usr/bin/java") 
-      args: "start",+      args: "start", // arguments or (set of arguments ["-jar", "/opt/project-path/project-name.jar"])
       env: {       env: {
         NODE_ENV: "production",          NODE_ENV: "production", 
         SOME_ENV: "some_value"...         SOME_ENV: "some_value"...
       },       },
 +      // "watch": [  Watch files if required autorestart
 +      //      "/opt/project-path/project-name.jar",
 +      //      "/opt/project-path/application.properties"
 +      //],
 +      // "node_args": [], // nodejs arguments
 +      // "exec_interpreter": "", // interpreter
     },     },
   ],   ],
works/linux/pm2.1654144885.txt.gz · Last modified: 2022/06/02 04:41 by Chugreev Eugene