Preview: ecosystem.config.js
Size: 677 B
/var/www/wordpress-nextjs.wpress.dk/httpdocs/ecosystem.config.js
module.exports = {
apps: [
{
name: "wordpress-next", // Your app's name
script: "npm", // The script to run
args: "start", // Arguments to pass (e.g., "start")
exec_mode: "fork", // Or 'cluster' if you want to run in cluster mode
instances: "1", // Number of instances (set to 'max' for all CPUs)
autorestart: true, // Restart the app if it crashes
watch: false, // Disable file watching in production
max_memory_restart: "1G", // Restart if memory exceeds 1GB
env: {
NODE_ENV: "production", // Environment variables
PORT: 3017, // Port for Next.js to run on
},
},
],
};
Directory Contents
Dirs: 3 × Files: 7