fix: add ecosystem.config.js

This commit is contained in:
DeathKaioken 2026-01-18 16:56:13 +01:00
parent 045ea9ec07
commit 633f374c6a

23
ecosystem.config.js Normal file
View File

@ -0,0 +1,23 @@
const path = require('path')
// Load existing .env into process.env for PM2/Next start
require('dotenv').config({ path: path.join(__dirname, '.env') })
module.exports = {
apps: [
{
name: 'profit-planet-frontend',
cwd: __dirname,
script: './node_modules/next/dist/bin/next',
args: `start -p ${process.env.PORT || 3000}`,
instances: 1,
exec_mode: 'fork',
autorestart: true,
watch: false,
time: true,
env: {
...process.env,
},
},
],
}