← back to Tools Dw Hub

ecosystem.config.js

20 lines

module.exports = {
  apps: [{
    name: 'tools-dw-hub',
    script: 'server.js',
    cwd: __dirname,
    env: {
      PORT: 9815,                    // fixed port for pm2/prod
      BASIC_AUTH: 'admin:DW2024!',
      PROBE_HOST: '100.82.17.107',   // Mac Studio tailnet IP — where the tool apps actually listen (bind *)
      TOOL_HOST: '100.82.17.107',    // Launch links resolve here; reachable from any tailnet device
      MAC_HUB: 'http://100.82.17.107:9815' // Kamatera proxies /api/start|stop to the Mac2 hub (ignored on Mac2 itself)
    },
    env_local: {
      PORT: 9815, BASIC_AUTH: 'admin:DW2024!', PROBE_HOST: '127.0.0.1', TOOL_HOST: ''
    },
    autorestart: true,
    max_restarts: 10
  }]
};