SPB Git

Repository Public

mld-manifest.json 8.8 KB 255 lines json

1{2  "app": "maclustr-identity",3  "label": "MacLustr Identity — vérification d'identité autogérée, multi-applications (identity.spboucher.ai)",4  "domain": "identity.spboucher.ai",5  "port": 8860,6  "health_path": "/health/ready",7  "dir": "~/apps/maclustr-identity",8  "sync_excludes": [9    ".DS_Store",10    "Icon?",11    "node_modules/",12    "apps/web/dist/",13    "__pycache__/",14    ".venv/",15    ".pytest_cache/",16    "var/",17    "test-results/",18    "sdk/swift/.build/",19    "sdk/kotlin/build/",20    "sdk/kotlin/.gradle/",21    "sdk/typescript/dist/"22  ],23  "requires": {24    "runtimes": [25      "node",26      "pm2",27      "pnpm",28      "postgresql@17",29      "uv"30    ],31    "ram_gb": 3,32    "ports": [33      8860,34      8861,35      886236    ]37  },38  "placement": {39    "pin": "M2M32c",40    "prefer": null,41    "avoid": [42      "M1M32",43      "m6ma",44      "M5M36"45    ],46    "reason": "Choisi par mld pick le 2026-12-01 (score 0.413, premier). Base PostgreSQL maclustr_identity et clé maîtresse locales (~/.config/maclustr-identity) : ne pas déplacer avec mld move."47  },48  "processes": [49    {50      "name": "maclustr-identity",51      "manager": "pm2",52      "script": "{{HOME}}/apps/maclustr-identity/.venv/bin/python",53      "args": [54        "-m",55        "uvicorn",56        "services.mlid.app:app",57        "--host",58        "0.0.0.0",59        "--port",60        "8860",61        "--workers",62        "4",63        "--no-server-header"64      ],65      "cwd": "{{HOME}}/apps/maclustr-identity",66      "autorestart": true,67      "max_memory_restart": "2G",68      "interpreter": null,69      "cron_restart": null,70      "kill_timeout": 8000,71      "env": {72        "MLID_ENV": "production",73        "MLID_ORIGIN": "https://identity.spboucher.ai",74        "MLID_RP_ID": "identity.spboucher.ai",75        "DATABASE_URL": "postgres://127.0.0.1/maclustr_identity",76        "MLID_MASTER_KEY_FILE": "{{HOME}}/.config/maclustr-identity/master.key",77        "MLID_DATA_DIR": "{{HOME}}/maclustr-identity-data",78        "MLID_TRUST_PROXY": "10.67.0.1,127.0.0.1",79        "PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin",80        "MLID_ALLOWED_PEERS": "127.0.0.1,10.67.0.1",81        "MLID_DB_POOL_MAX": "5"82      }83    },84    {85      "name": "maclustr-identity-internal",86      "manager": "pm2",87      "script": "{{HOME}}/apps/maclustr-identity/.venv/bin/python",88      "args": [89        "-m",90        "uvicorn",91        "services.mlid.internal_app:app",92        "--host",93        "127.0.0.1",94        "--port",95        "8861",96        "--no-server-header"97      ],98      "cwd": "{{HOME}}/apps/maclustr-identity",99      "autorestart": true,100      "max_memory_restart": "700M",101      "interpreter": null,102      "cron_restart": null,103      "kill_timeout": 8000,104      "env": {105        "MLID_ENV": "production",106        "MLID_ORIGIN": "https://identity.spboucher.ai",107        "MLID_RP_ID": "identity.spboucher.ai",108        "DATABASE_URL": "postgres://127.0.0.1/maclustr_identity",109        "MLID_MASTER_KEY_FILE": "{{HOME}}/.config/maclustr-identity/master.key",110        "MLID_DATA_DIR": "{{HOME}}/maclustr-identity-data",111        "PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin",112        "MLID_DB_POOL_MAX": "4"113      }114    },115    {116      "name": "maclustr-identity-internal-lan",117      "manager": "pm2",118      "script": "{{HOME}}/apps/maclustr-identity/.venv/bin/python",119      "args": [120        "-m",121        "services.mlid.internal_serve"122      ],123      "cwd": "{{HOME}}/apps/maclustr-identity",124      "autorestart": true,125      "max_memory_restart": "700M",126      "interpreter": null,127      "cron_restart": null,128      "kill_timeout": 8000,129      "env": {130        "MLID_ENV": "production",131        "MLID_ORIGIN": "https://identity.spboucher.ai",132        "MLID_RP_ID": "identity.spboucher.ai",133        "DATABASE_URL": "postgres://127.0.0.1/maclustr_identity",134        "MLID_MASTER_KEY_FILE": "{{HOME}}/.config/maclustr-identity/master.key",135        "MLID_DATA_DIR": "{{HOME}}/maclustr-identity-data",136        "PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin",137        "MLID_PKI_DIR": "{{HOME}}/.config/maclustr-identity/pki",138        "MLID_INTERNAL_TLS_PORT": "8862",139        "MLID_DB_POOL_MAX": "4"140      }141    },142    {143      "name": "maclustr-identity-dispatcher",144      "manager": "pm2",145      "script": "{{HOME}}/apps/maclustr-identity/.venv/bin/python",146      "args": [147        "-m",148        "services.mlid.dispatcher"149      ],150      "cwd": "{{HOME}}/apps/maclustr-identity",151      "autorestart": true,152      "max_memory_restart": "500M",153      "interpreter": null,154      "cron_restart": null,155      "kill_timeout": 8000,156      "env": {157        "MLID_ENV": "production",158        "MLID_ORIGIN": "https://identity.spboucher.ai",159        "MLID_RP_ID": "identity.spboucher.ai",160        "DATABASE_URL": "postgres://127.0.0.1/maclustr_identity",161        "MLID_MASTER_KEY_FILE": "{{HOME}}/.config/maclustr-identity/master.key",162        "MLID_DATA_DIR": "{{HOME}}/maclustr-identity-data",163        "PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin",164        "MLID_DB_POOL_MAX": "4"165      }166    },167    {168      "name": "maclustr-identity-worker",169      "manager": "pm2",170      "script": "{{HOME}}/apps/maclustr-identity/.venv/bin/python",171      "args": [172        "-m",173        "services.mlid.worker.main"174      ],175      "cwd": "{{HOME}}/apps/maclustr-identity",176      "autorestart": true,177      "max_memory_restart": "2G",178      "interpreter": null,179      "cron_restart": null,180      "kill_timeout": 15000,181      "env": {182        "MLID_ENV": "production",183        "MLID_INTERNAL_URL": "http://127.0.0.1:8861",184        "MLID_WORKER_TOKEN_FILE": "{{HOME}}/.config/maclustr-identity/worker.token",185        "MLID_MASTER_KEY_FILE": "{{HOME}}/.config/maclustr-identity/master.key",186        "PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin",187        "MLID_WORKER_PROCS": "3"188      }189    },190    {191      "name": "maclustr-identity-backup",192      "manager": "pm2",193      "script": "/bin/zsh",194      "args": [195        "scripts/backup.sh"196      ],197      "cwd": "{{HOME}}/apps/maclustr-identity",198      "cron_restart": "50 3 * * *",199      "autorestart": false,200      "interpreter": null,201      "max_memory_restart": null,202      "env": {203        "PATH": "/opt/homebrew/bin:/opt/homebrew/opt/postgresql@17/bin:/usr/bin:/bin:/usr/sbin:/sbin"204      }205    },206    {207      "name": "maclustr-identity-monitor",208      "manager": "pm2",209      "script": "{{HOME}}/apps/maclustr-identity/.venv/bin/python",210      "args": [211        "-m",212        "services.mlid.monitor"213      ],214      "cwd": "{{HOME}}/apps/maclustr-identity",215      "cron_restart": "*/5 * * * *",216      "autorestart": false,217      "interpreter": null,218      "max_memory_restart": null,219      "env": {220        "MLID_ENV": "production",221        "MLID_ORIGIN": "https://identity.spboucher.ai",222        "DATABASE_URL": "postgres://127.0.0.1/maclustr_identity",223        "MLID_MASTER_KEY_FILE": "{{HOME}}/.config/maclustr-identity/master.key",224        "MLID_DATA_DIR": "{{HOME}}/maclustr-identity-data",225        "MLID_DB_POOL_MAX": "2",226        "MLID_ALERT_SPMAIL_KEY_FILE": "{{HOME}}/.config/maclustr-identity/alerts-spmail.key",227        "MLID_ALERT_TO": "simon@spboucher.ai",228        "MLID_ALERT_FROM": "alerts@spboucher.ai",229        "PATH": "/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin",230        "MLID_EXPECTED_WORKERS": "2",231        "MLID_EXPECT_OFFNODE": "1"232      }233    }234  ],235  "hooks": {236    "post_sync": [237      "zsh scripts/node-setup.sh",238      "set -o pipefail; export PATH=\"/opt/homebrew/bin:$PATH\"; cd apps/web && pnpm install --frozen-lockfile --silent 2>&1 | tail -2; pnpm build 2>&1 | tail -1 && test -f dist/index.html && echo '  web ok'"239    ],240    "post_start": []241  },242  "tunnel": {243    "domain": "identity.spboucher.ai",244    "gateway": "BHS64",245    "aliases": [],246    "redirects": [],247    "websocket": false,248    "note": "DNS identity.spboucher.ai → 51.161.112.61 en place (vérifié 2026-12-01). Seul le port 8860 est routé ; l'API interne 8861 n'écoute que sur 127.0.0.1. Le port 8862 (API interne, TLS mutuel obligatoire) n'est joignable que du réseau local, pour les workers d'autres Mac."249  },250  "notes": "API /v1 + console + interface Web (apps/web/dist). Données : PostgreSQL maclustr_identity ; pièces chiffrées temporaires ~/maclustr-identity-data. Clés : ~/.config/maclustr-identity/{master.key,backup.key,worker.token}. Dépôt PRIVÉ gitsrv:srv/git-private/maclustr-identity.git (ne pas lancer mld adopt). Mise à jour : zsh scripts/update.sh sur le nœud. Ne pas mld move (base et clé maîtresse locales). Voir docs/DEPLOYMENT.md. Surveillance : maclustr-identity-monitor (toutes les 5 min, alertes par SP Mail à simon@spboucher.ai, clé ~/.config/maclustr-identity/alerts-spmail.key). Copie hors nœud des sauvegardes : M1M32:~/dispatch/maclustr-identity-offnode.sh (05:10) → M4M64b:~/backups-offnode/maclustr-identity.",251  "extra_paths": [],252  "launchd": [],253  "env_overrides": {},254  "ka_repo": false255}
Files main
Menu

Theme