SPB Git

Repository Public

mld-manifest.template.json 4.3 KB 152 lines json

1{2 "app": "sp-drive",3 "label": "SP Drive — stockage documentaire privé (drive.spboucher.ai)",4 "domain": "drive.spboucher.ai",5 "port": 8660,6 "health_path": "/api/v1/health/live",7 "dir": "~/apps/sp-drive",8 "sync_excludes": [9  ".DS_Store",10  "node_modules/",11  "test-results/",12  "playwright-report/",13  ".dev/"14 ],15 "requires": {16  "runtimes": [17   "node",18   "pm2",19   "postgresql@17"20  ],21  "ram_gb": 3,22  "ports": [23   866024  ]25 },26 "placement": {27  "pin": "m5ma",28  "prefer": null,29  "avoid": [30   "M1M32",31   "m6ma"32  ],33  "reason": "Fichiers chiffrés, clé maîtresse, PostgreSQL et ClamAV locaux sur le SSD de m5ma : ne pas déplacer avec mld move (les données ne suivent pas)"34 },35 "processes": [36  {37   "name": "sp-drive",38   "manager": "pm2",39   "script": "/opt/homebrew/bin/node",40   "args": [41    "dist/api.mjs"42   ],43   "cwd": "{{HOME}}/apps/sp-drive",44   "autorestart": true,45   "max_memory_restart": "1200M",46   "env": {47    "NODE_ENV": "production",48    "PORT": "8660",49    "HOST": "0.0.0.0",50    "SPD_ORIGIN": "https://drive.spboucher.ai",51    "SPD_RP_ID": "drive.spboucher.ai",52    "DATABASE_URL": "postgres://127.0.0.1/sp_drive",53    "SPD_WEB_DIR": "{{HOME}}/apps/sp-drive/dist/web",54    "SPD_APP_DIR": "{{HOME}}/apps/sp-drive",55    "SPD_TRUST_PROXY": "10.67.0.1,127.0.0.1",56    "SPD_CLAMD_SOCKET": "{{HOME}}/sp-drive-data/run/clamd.sock",57    "SPD_AV_MODE": "required",58    "PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin"59   },60   "interpreter": null,61   "cron_restart": null62  },63  {64   "name": "sp-drive-worker",65   "manager": "pm2",66   "script": "/opt/homebrew/bin/node",67   "args": [68    "dist/worker.mjs"69   ],70   "cwd": "{{HOME}}/apps/sp-drive",71   "autorestart": true,72   "max_memory_restart": "1500M",73   "env": {74    "NODE_ENV": "production",75    "SPD_ORIGIN": "https://drive.spboucher.ai",76    "SPD_RP_ID": "drive.spboucher.ai",77    "DATABASE_URL": "postgres://127.0.0.1/sp_drive",78    "SPD_APP_DIR": "{{HOME}}/apps/sp-drive",79    "SPD_CLAMD_SOCKET": "{{HOME}}/sp-drive-data/run/clamd.sock",80    "SPD_AV_MODE": "required",81    "PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin"82   },83   "interpreter": null,84   "cron_restart": null85  },86  {87   "name": "sp-drive-clamd",88   "manager": "pm2",89   "script": "/opt/homebrew/sbin/clamd",90   "args": [91    "-c",92    "{{HOME}}/sp-drive-data/run/clamd.conf"93   ],94   "cwd": "{{HOME}}/apps/sp-drive",95   "autorestart": true,96   "interpreter": "none",97   "env": {},98   "cron_restart": null,99   "max_memory_restart": null100  },101  {102   "name": "sp-drive-freshclam",103   "manager": "pm2",104   "script": "/opt/homebrew/bin/freshclam",105   "args": [106    "--config-file={{HOME}}/sp-drive-data/run/freshclam.conf"107   ],108   "cwd": "{{HOME}}/apps/sp-drive",109   "interpreter": "none",110   "cron_restart": "17 */6 * * *",111   "autorestart": false,112   "env": {},113   "max_memory_restart": null114  },115  {116   "name": "sp-drive-backup",117   "manager": "pm2",118   "script": "/bin/zsh",119   "args": [120    "scripts/backup.sh"121   ],122   "cwd": "{{HOME}}/apps/sp-drive",123   "cron_restart": "40 3 * * *",124   "autorestart": false,125   "env": {126    "DATABASE_URL": "postgres://127.0.0.1/sp_drive",127    "PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin"128   },129   "interpreter": null,130   "max_memory_restart": null131  }132 ],133 "hooks": {134  "post_sync": [135   "set -o pipefail; export PATH=\"/opt/homebrew/bin:$PATH\"; pnpm install --frozen-lockfile --silent 2>&1 | tail -2; test -d node_modules/fastify && echo '  deps ok'",136   "set -o pipefail; export PATH=\"/opt/homebrew/bin:$PATH\"; node scripts/build.mjs >/dev/null && (cd apps/web && node_modules/.bin/vite build 2>&1 | tail -1) && test -f dist/api.mjs && test -f dist/web/index.html && echo '  build ok'",137   "zsh scripts/node-setup.sh"138  ],139  "post_start": []140 },141 "tunnel": {142  "domain": "drive.spboucher.ai",143  "gateway": "BHS64",144  "note": "DNS drive.spboucher.ai → 51.161.112.61 en place (vérifié 2026-11-11)"145 },146 "notes": "API + web (dist/), worker, clamd, freshclam, sauvegarde nocturne. Données : ~/sp-drive-data (objets chiffrés), clé maîtresse ~/.config/sp-drive/master.key (copie hors nœud obligatoire). Rebuild sur le nœud : pnpm install --frozen-lockfile && pnpm build && pm2 restart sp-drive sp-drive-worker. Voir docs/runbooks/operations.md.",147 "extra_paths": [],148 "ngrok": null,149 "launchd": [],150 "env_overrides": {},151 "ka_repo": false152}
Files main
Menu

Theme