mymusics

retro MySpace-style music player
Log | Files | Refs | README

ecosystem.config.cjs (843B)


      1 "use strict";
      2 
      3 /** PM2 process file — run from the `mymusics` directory after `npm run build`. */
      4 module.exports = {
      5   apps: [
      6     {
      7       name: "mymusics",
      8       cwd: __dirname,
      9       script: "dist-server/server/index.js",
     10       instances: 1,
     11       exec_mode: "fork",
     12       autorestart: true,
     13       watch: false,
     14       max_memory_restart: "800M",
     15       env_production: {
     16         NODE_ENV: "production",
     17         // Uses predefined pool in config/ports.ts — set PORT_INDEX 0..3 or explicit PORT
     18         PORT_INDEX: "0",
     19         SERVE_STATIC: "true",
     20         TRACKS_DB: "data/tracks.db",
     21         // After deploy: npm run index-metadata (or index-metadata --if-stale) when metadata.tsv changes
     22         // Required on VPS if metadata is outside the repo:
     23         // METADATA_TSV: "/var/www/mymusics-data/metadata.tsv",
     24       },
     25     },
     26   ],
     27 };