{
  "app": "company-atlas",
  "label": "Company Atlas — the live atlas of global companies",
  "domain": "www.company-atlas.co",
  "port": 8360,
  "health_path": "/api/v1/health",
  "dir": "~/apps/company-atlas",
  "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-*/",
    "apps/web/next-env.d.ts",
    "*.tsbuildinfo",
    "apps/web/qa/screens/",
    "/data/",
    "/tmp/",
    "logs/",
    ".DS_Store",
    ".claude/",
    "deploy/.admin-token",
    "deploy/.llm-key",
    "deploy/rendered/",
    "fixtures/live/"
  ],
  "requires": {
    "runtimes": [
      "pm2",
      "node",
      "pnpm",
      "uv",
      "uv-python@3.12"
    ],
    "ram_gb": 12,
    "ports": [
      8360,
      8361
    ]
  },
  "ram_mb_observed": 4000,
  "size_mb": 80,
  "placement": {
    "pin": "M2U64",
    "prefer": null,
    "avoid": [
      "M3U96b",
      "M1M32"
    ],
    "reason": "Mac Studio M2 Ultra 24 c / 64 Go, 53 Go libres, Postgres 17 Homebrew déjà présent (base companyatlas créée le 2026-09-12), wg1 10.67.0.12 ; crawler continu (25 000+ capteurs) + Postgres = nœud le plus généreux hors M3U96a/b"
  },
  "processes": [
    {
      "name": "company-atlas-api",
      "manager": "pm2",
      "script": "{{HOME}}/apps/company-atlas/.venv/bin/python",
      "args": [
        "-m",
        "uvicorn",
        "companyatlas.api.main:app",
        "--host",
        "127.0.0.1",
        "--port",
        "8361",
        "--no-access-log",
        "--proxy-headers",
        "--timeout-keep-alive",
        "75",
        "--workers",
        "2"
      ],
      "interpreter": null,
      "cwd": "{{HOME}}/apps/company-atlas",
      "env": {
        "APP_ENV": "production",
        "CA_SITE_URL": "https://www.company-atlas.co",
        "DATABASE_URL": "postgresql+asyncpg://companyatlas:companyatlas@127.0.0.1:5432/companyatlas",
        "CA_DATA_DIR": "{{HOME}}/company-atlas-data",
        "CA_API_HOST": "127.0.0.1",
        "CA_API_PORT": "8361",
        "CA_ADMIN_TOKEN": "{{ADMIN_TOKEN}}",
        "CA_LLM_BASE_URL": "https://www.llm-api.io/v1",
        "CA_LLM_API_KEY": "{{LLM_KEY}}",
        "CA_DB_POOL_SIZE": "6",
        "CA_LOG_JSON": "1",
        "PYTHONUNBUFFERED": "1"
      },
      "cron_restart": null,
      "autorestart": true,
      "max_memory_restart": "2G"
    },
    {
      "name": "company-atlas-scheduler",
      "manager": "pm2",
      "script": "{{HOME}}/apps/company-atlas/.venv/bin/catlas",
      "args": [
        "schedule"
      ],
      "interpreter": null,
      "cwd": "{{HOME}}/apps/company-atlas",
      "env": {
        "APP_ENV": "production",
        "CA_SITE_URL": "https://www.company-atlas.co",
        "DATABASE_URL": "postgresql+asyncpg://companyatlas:companyatlas@127.0.0.1:5432/companyatlas",
        "CA_DATA_DIR": "{{HOME}}/company-atlas-data",
        "CA_ADMIN_TOKEN": "{{ADMIN_TOKEN}}",
        "CA_LLM_BASE_URL": "https://www.llm-api.io/v1",
        "CA_LLM_API_KEY": "{{LLM_KEY}}",
        "CA_FETCH_CONCURRENCY": "48",
        "CA_SCHEDULER_CLAIM_BATCH": "400",
        "CA_ONBOARDING_CONCURRENCY": "12",
        "CA_DB_POOL_SIZE": "12",
        "CA_DB_MAX_OVERFLOW": "12",
        "CA_WORKER_CONCURRENCY": "1",
        "CA_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": "6G"
    },
    {
      "name": "company-atlas-web",
      "manager": "pm2",
      "script": "/opt/homebrew/bin/node",
      "args": [
        "node_modules/next/dist/bin/next",
        "start",
        "-p",
        "8360",
        "-H",
        "0.0.0.0"
      ],
      "interpreter": null,
      "cwd": "{{HOME}}/apps/company-atlas/apps/web",
      "env": {
        "NODE_ENV": "production",
        "API_URL": "http://127.0.0.1:8361",
        "NEXT_PUBLIC_SITE_URL": "https://www.company-atlas.co",
        "NEXT_TELEMETRY_DISABLED": "1"
      },
      "cron_restart": null,
      "autorestart": true,
      "max_memory_restart": "2G"
    }
  ],
  "ngrok": null,
  "launchd": [],
  "env_overrides": {},
  "hooks": {
    "post_sync": [
      "set -o pipefail; mkdir -p $HOME/company-atlas-data/{objects,logs,backups,cache,seed} && echo '  data dirs ok'",
      "set -o pipefail; 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'",
      "set -o pipefail; export PATH=\"/opt/homebrew/opt/postgresql@17/bin:/opt/homebrew/bin:$PATH\"; export DATABASE_URL=postgresql+asyncpg://companyatlas:companyatlas@127.0.0.1:5432/companyatlas CA_DATA_DIR=$HOME/company-atlas-data CA_LOG_JSON=0; .venv/bin/catlas migrate 2>&1 | tail -1 && .venv/bin/catlas seed 2>&1 | tail -2 && echo '  migrate + seed ok'",
      "set -o pipefail; export PATH=\"/opt/homebrew/bin:$PATH\"; pnpm install --frozen-lockfile --silent && echo '  web deps ok'",
      "set -o pipefail; export PATH=\"/opt/homebrew/bin:$PATH\"; cd apps/web && API_URL=http://127.0.0.1:8361 NEXT_PUBLIC_SITE_URL=https://www.company-atlas.co NEXT_TELEMETRY_DISABLED=1 pnpm build 2>&1 | tail -3 && echo '  web build ok'"
    ],
    "post_start": []
  },
  "notes": "v0.1.0 (2026-09-12) : Next 16 :8360 (rewrites /api/v1/* → FastAPI 127.0.0.1:8361, 2 workers uvicorn), scheduler `catlas schedule` (capteurs dus + onboarding/discovery + tâches périodiques : events, enrichissement LLM via llm-api.io, métriques horaires, agrégats quotidiens, signaux, tendances, alertes, réparation, rétention, backup pg_dump). Postgres 17 Homebrew local (base companyatlas, rôle companyatlas) ; pas de Redis. Données hors repo ~/company-atlas-data (objets zstd content-addressed, logs, backups). Secrets : CA_ADMIN_TOKEN (laptop deploy/.admin-token) et CA_LLM_API_KEY (laptop deploy/.llm-key, clé llm-api.io « company-atlas »). Après le premier deploy : `bash deploy/first-run.sh` sur le nœud (onboarding de masse). DNS : www.company-atlas.co A → 51.161.112.61 (OK) ; apex company-atlas.co sans A ; company-atlas.com a ses NS chez Vercel — à repointer avant d'ajouter la route/redirection .com.",
  "tunnel": {
    "domain": "www.company-atlas.co",
    "gateway": "BHS64",
    "redirects": [],
    "note": "Ajouter company-atlas.co (apex) et www.company-atlas.com / company-atlas.com dans redirects dès que leurs A pointent vers 51.161.112.61."
  }
}
