Skip to content

Commit

Permalink
chore(*): add pm2 config
Browse files Browse the repository at this point in the history
  • Loading branch information
neki-dev committed Aug 7, 2024
1 parent b1eb9ad commit f2c77bd
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"start": "node ./dist/server.js",
"build:client": "webpack --config ./webpack/.client.js --mode=production",
"build:server": "webpack --config ./webpack/.server.js --mode=production",
"build": "yarn build:server && yarn build:client",
"build": "yarn build:server && yarn build:client && cp ./pm2.config.js ./dist/pm2.config.js",
"watch": "webpack --config ./webpack/index.js --mode=development --watch",
"lint": "eslint \"./**/*.{js,ts,tsx}\" --ignore-path .gitignore --fix",
"format": "prettier --write \"src/**/*.{ts,tsx,json}\""
Expand Down
31 changes: 31 additions & 0 deletions pm2.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
apps: [
{
/**
* General
*/
name: "dothree",
script: "./server.js",
max_memory_restart: "512M",

/**
* Environment
*/
env_production: {
NODE_ENV: "production",
},
env_development: {
NODE_ENV: "development",
},

/**
* Logs
*/
out_file: "./logs/stdout.log",
error_file: "./logs/error.log",
merge_logs: true,
log_date_format: "DD.MM.YYYY HH:mm:ss Z",
log_type: "json",
},
],
};

0 comments on commit f2c77bd

Please sign in to comment.