← back to Dw Signup Fulfillment

ecosystem.config.js

24 lines

// pm2 process definition for dw-signup-fulfillment.
//   pm2 start ecosystem.config.js
//
// DRY_RUN defaults ON here — go-live is a deliberate flip to DRY_RUN=0 (see
// DEPLOY.md), never an accident of forgetting to set it.
module.exports = {
  apps: [
    {
      name: 'dw-signup-fulfillment',
      script: 'server.js',
      cwd: __dirname,
      instances: 1,
      exec_mode: 'fork',
      autorestart: true,
      max_restarts: 10,
      env: {
        NODE_ENV: 'production',
        PORT: '9862',
        DRY_RUN: '1', // <-- flip to '0' at go-live (DEPLOY.md), and only then.
      },
    },
  ],
};