24 lines
520 B
JavaScript
24 lines
520 B
JavaScript
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,
|
|
},
|
|
},
|
|
],
|
|
}
|