{
  "app": "satelliteindex",
  "label": "SatelliteIndex — the world's orbital infrastructure, mapped and indexed",
  "domain": "www.satelliteindex.io",
  "port": 8310,
  "health_path": "/api/v1/health",
  "dir": "~/apps/satelliteindex",
  "extra_paths": [],
  "sync_excludes": [
    ".venv/", "__pycache__/", ".pytest_cache/", ".ruff_cache/", "*.egg-info/", ".git/", ".env", ".env.*", "!.env.example",
    "node_modules/", "apps/web/.next/", "apps/web/next-env.d.ts", "*.tsbuildinfo", "apps/web/qa/screens/",
    "/data/", "/tmp/", "logs/", ".DS_Store", ".claude/", "deploy/.admin-token", "deploy/rendered/"
  ],
  "requires": {
    "runtimes": ["pm2", "node", "pnpm", "uv", "uv-python@3.12"],
    "ram_gb": 6,
    "ports": [8310, 8311]
  },
  "ram_mb_observed": 2200,
  "size_mb": 40,
  "placement": {
    "pin": "M2M32b",
    "prefer": null,
    "avoid": ["M3U96b", "M1M32"],
    "reason": "Mac Studio M2 Max 12 c / 32 Go dédié (aucune autre app), Postgres 17 + Redis Homebrew installés le 2026-09-11, raccordé au tunnel wg1 (10.67.0.19)"
  },
  "processes": [
    {
      "name": "satelliteindex-api",
      "manager": "pm2",
      "script": "{{HOME}}/apps/satelliteindex/.venv/bin/python",
      "args": ["-m", "uvicorn", "satelliteindex.api.main:app", "--host", "127.0.0.1", "--port", "8311", "--no-access-log", "--proxy-headers", "--timeout-keep-alive", "75", "--workers", "2"],
      "interpreter": null,
      "cwd": "{{HOME}}/apps/satelliteindex",
      "env": {
        "APP_ENV": "production",
        "APP_DOMAIN": "www.satelliteindex.io",
        "SI_SITE_URL": "https://www.satelliteindex.io",
        "DATABASE_URL": "postgresql+asyncpg://satelliteindex:satelliteindex@127.0.0.1:5432/satelliteindex",
        "REDIS_URL": "redis://127.0.0.1:6379/4",
        "SI_DATA_DIR": "{{HOME}}/satelliteindex-data",
        "SI_API_HOST": "127.0.0.1",
        "SI_API_PORT": "8311",
        "SI_ADMIN_TOKEN": "{{ADMIN_TOKEN}}",
        "SI_LOG_JSON": "1",
        "PYTHONUNBUFFERED": "1"
      },
      "cron_restart": null,
      "autorestart": true,
      "max_memory_restart": "3G"
    },
    {
      "name": "satelliteindex-scheduler",
      "manager": "pm2",
      "script": "{{HOME}}/apps/satelliteindex/.venv/bin/si",
      "args": ["schedule"],
      "interpreter": null,
      "cwd": "{{HOME}}/apps/satelliteindex",
      "env": {
        "APP_ENV": "production",
        "SI_SITE_URL": "https://www.satelliteindex.io",
        "DATABASE_URL": "postgresql+asyncpg://satelliteindex:satelliteindex@127.0.0.1:5432/satelliteindex",
        "REDIS_URL": "redis://127.0.0.1:6379/4",
        "SI_DATA_DIR": "{{HOME}}/satelliteindex-data",
        "SI_ADMIN_TOKEN": "{{ADMIN_TOKEN}}",
        "SI_LOG_JSON": "1",
        "PATH": "/opt/homebrew/opt/postgresql@17/bin:/opt/homebrew/bin:/usr/bin:/bin",
        "PYTHONUNBUFFERED": "1"
      },
      "cron_restart": null,
      "autorestart": true,
      "max_memory_restart": "4G"
    },
    {
      "name": "satelliteindex-web",
      "manager": "pm2",
      "script": "/opt/homebrew/bin/node",
      "args": ["node_modules/next/dist/bin/next", "start", "-p", "8310", "-H", "0.0.0.0"],
      "interpreter": null,
      "cwd": "{{HOME}}/apps/satelliteindex/apps/web",
      "env": {
        "NODE_ENV": "production",
        "API_URL": "http://127.0.0.1:8311",
        "NEXT_PUBLIC_SITE_URL": "https://www.satelliteindex.io",
        "SI_ADMIN_TOKEN": "{{ADMIN_TOKEN}}",
        "NEXT_TELEMETRY_DISABLED": "1"
      },
      "cron_restart": null,
      "autorestart": true,
      "max_memory_restart": "2G"
    }
  ],
  "ngrok": null,
  "launchd": [],
  "env_overrides": {},
  "hooks": {
    "post_sync": [
      "mkdir -p $HOME/satelliteindex-data/{raw,logs,backups,cache} && echo '  data dirs ok'",
      "export PATH=\"$HOME/.local/bin:/opt/homebrew/bin:$PATH\"; (test -x .venv/bin/python || uv venv --python 3.12 .venv) && uv pip install -q --python .venv/bin/python -e . && echo '  python deps ok'",
      "export PATH=\"/opt/homebrew/opt/postgresql@17/bin:/opt/homebrew/bin:$PATH\"; DATABASE_URL=postgresql+asyncpg://satelliteindex:satelliteindex@127.0.0.1:5432/satelliteindex SI_DATA_DIR=$HOME/satelliteindex-data SI_LOG_JSON=0 .venv/bin/si migrate 2>&1 | tail -2 && DATABASE_URL=postgresql+asyncpg://satelliteindex:satelliteindex@127.0.0.1:5432/satelliteindex SI_DATA_DIR=$HOME/satelliteindex-data SI_LOG_JSON=0 .venv/bin/si seed | tail -1 && echo '  migrate + seed ok'",
      "export PATH=\"/opt/homebrew/bin:$PATH\"; pnpm install --frozen-lockfile --silent && echo '  web deps ok'",
      "export PATH=\"/opt/homebrew/bin:$PATH\"; cd apps/web && API_URL=http://127.0.0.1:8311 NEXT_PUBLIC_SITE_URL=https://www.satelliteindex.io NEXT_TELEMETRY_DISABLED=1 pnpm build 2>&1 | tail -3 && echo '  web build ok'"
    ],
    "post_start": []
  },
  "notes": "v0.1.0 (2026-09-11) : Next 16 :8310 (rewrites /api/v1/* → FastAPI 127.0.0.1:8311, 2 workers uvicorn), scheduler APScheduler (CelesTrak GP 2 h, groupes 2 h, SATCAT 24 h, analytics dérivées 1 h, backup pg_dump 04:40) ; Postgres 17 + Redis Homebrew locaux ; données hors repo ~/satelliteindex-data (raw gzip, backups, logs). Secret SI_ADMIN_TOKEN uniquement ici (laptop : deploy/.admin-token). Après le premier deploy : bash deploy/first-run.sh (ingestion initiale).",
  "tunnel": {
    "domain": "www.satelliteindex.io",
    "gateway": "BHS64",
    "redirects": [],
    "note": "DNS A www → 51.161.112.61 posé par l'utilisateur le 2026-09-11 ; apex satelliteindex.io sans A record (ajouter A @ → 51.161.112.61 puis redirects: [\"satelliteindex.io\"])"
  }
}
