{
  "app": "tools-spboucher-ai",
  "label": "Tools · SPBoucher — curated tool encyclopedia (tools.spboucher.ai)",
  "domain": "tools.spboucher.ai",
  "port": 8540,
  "health_path": "/api/health",
  "dir": "~/apps/tools-spboucher-ai",
  "extra_paths": [],
  "sync_excludes": [
    ".git/",
    ".DS_Store",
    "node_modules/",
    ".next/",
    "backups/",
    "exports/*.json",
    "exports/*.csv",
    ".env",
    ".env.*",
    "test-results/",
    "playwright-report/",
    "tsconfig.tsbuildinfo",
    "docs/_a11y-results.json"
  ],
  "requires": {
    "runtimes": [
      "node",
      "pnpm",
      "pm2",
      "postgresql@17"
    ],
    "ram_gb": 3,
    "ports": [
      8540
    ]
  },
  "ram_mb_observed": 600,
  "size_mb": 30,
  "placement": {
    "pin": "M2M32c",
    "prefer": "M2M32c",
    "avoid": [
      "M1M32"
    ],
    "reason": "Idle node (0 PM2 processes) with PostgreSQL 17.11 + pgvector 0.8.6 (DB tools_spboucher, roles tools_app/tools_reader), 417 GB SSD, wg1 10.67.0.20"
  },
  "processes": [
    {
      "name": "tools-web",
      "manager": "pm2",
      "script": "/opt/homebrew/bin/node",
      "args": [
        "node_modules/next/dist/bin/next",
        "start",
        "-p",
        "8540",
        "-H",
        "0.0.0.0"
      ],
      "interpreter": null,
      "cwd": "{{HOME}}/apps/tools-spboucher-ai",
      "env": {
        "NODE_ENV": "production",
        "PORT": "8540",
        "NEXT_TELEMETRY_DISABLED": "1"
      },
      "cron_restart": null,
      "autorestart": true,
      "max_memory_restart": "1500M"
    },
    {
      "name": "tools-worker",
      "manager": "pm2",
      "script": "/opt/homebrew/bin/node",
      "args": [
        "node_modules/tsx/dist/cli.mjs",
        "src/worker/index.ts"
      ],
      "interpreter": null,
      "cwd": "{{HOME}}/apps/tools-spboucher-ai",
      "env": {
        "NODE_ENV": "production",
        "NEXT_TELEMETRY_DISABLED": "1",
        "PATH": "/opt/homebrew/opt/postgresql@17/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin"
      },
      "cron_restart": null,
      "autorestart": true,
      "max_memory_restart": "1G"
    }
  ],
  "ngrok": null,
  "launchd": [],
  "env_overrides": {},
  "hooks": {
    "post_sync": [
      "set -o pipefail; export PATH=\"/opt/homebrew/bin:$PATH\"; test -f .env || { echo 'ERREUR: .env absent (secrets) — copier ~/Desktop/Cluster/secrets/tools-spboucher-ai/.env'; exit 1; }; chmod 600 .env",
      "set -o pipefail; export PATH=\"/opt/homebrew/bin:$PATH\"; pnpm install --frozen-lockfile --silent && test -d node_modules/next && echo '  deps ok'",
      "set -o pipefail; export PATH=\"/opt/homebrew/opt/postgresql@17/bin:/opt/homebrew/bin:$PATH\"; set -a; . ./.env; set +a; pnpm db:migrate && pnpm content:import --publish > /dev/null && pnpm bootstrap && echo '  db ok'",
      "set -o pipefail; export PATH=\"/opt/homebrew/bin:$PATH\"; set -a; . ./.env; set +a; NEXT_TELEMETRY_DISABLED=1 pnpm build 2>&1 | tail -3 && test -f .next/BUILD_ID && echo '  build ok'",
      "mkdir -p ~/backups/tools-spboucher-ai && chmod 700 ~/backups/tools-spboucher-ai && echo '  backup dir ok'"
    ],
    "post_start": []
  },
  "ka_repo": false,
  "tunnel": {
    "domain": "tools.spboucher.ai",
    "gateway": "BHS64",
    "note": "DNS GoDaddy A tools.spboucher.ai → 51.161.112.61 vérifié le 2026-11-02 (enregistrement explicite préexistant) ; route Caddy posée par mld deploy"
  },
  "notes": "Next.js 16 + PostgreSQL 17/pgvector local (DB tools_spboucher ; rôles tools_app lecture/écriture, tools_reader lecture seule sur les vues publiques) + worker tsx (liens, fraîcheur, embeddings optionnels, sauvegardes chiffrées 04:20 → ~/backups + M3U96b). Secrets uniquement dans ~/apps/tools-spboucher-ai/.env (600) ; copie ~/Desktop/Cluster/secrets/tools-spboucher-ai/.env."
}
