Latest updarte
This commit is contained in:
37
ecosystem.config.js
Normal file
37
ecosystem.config.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/** @type {import('pm2').StartOptions} */
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "bistrousky",
|
||||
script: ".next/standalone/server.js",
|
||||
cwd: "/opt/eshop_bistrousky",
|
||||
|
||||
// Prostředí
|
||||
env_production: {
|
||||
NODE_ENV: "production",
|
||||
PORT: 3000,
|
||||
HOSTNAME: "127.0.0.1",
|
||||
},
|
||||
|
||||
// Clustering — využije všechna jádra CPU
|
||||
instances: "max",
|
||||
exec_mode: "cluster",
|
||||
|
||||
// Automatický restart při pádu
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_restarts: 10,
|
||||
restart_delay: 3000,
|
||||
|
||||
// Logy
|
||||
out_file: "/opt/eshop_bistrousky/logs/out.log",
|
||||
error_file: "/opt/eshop_bistrousky/logs/error.log",
|
||||
merge_logs: true,
|
||||
log_date_format: "YYYY-MM-DD HH:mm:ss",
|
||||
|
||||
// Graceful shutdown (čeká na dokončení požadavků)
|
||||
kill_timeout: 5000,
|
||||
listen_timeout: 10000,
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user