Some checks failed
CI / test-and-build (push) Failing after 25s
Co-authored-by: Cursor <cursoragent@cursor.com>
2.9 KiB
2.9 KiB
Checklist pre-deploy Tloto (après harden-vps.sh)
À cocher avant npm run phase-b:init ou phase-b:init:https sur le VPS durci.
Accès & OS
ssh deploy@<IP>fonctionne sans mot de passesudo -n trueOK pourdeployPermitRootLogin no/PasswordAuthentication no(fichier/etc/ssh/sshd_config.d/99-tloto.conf)sudo ufw status: allow seulement22/tcp(OpenSSH),9080/tcp,9443/tcpfail2ban-client status sshdactifdocker --versionetdocker compose versionOK- Postgres écoute localhost :
ss -tlnp | grep 5432→127.0.0.1/::1seulement
Secrets (générer une fois, backup offline, jamais git)
# Sur le VPS ou en local, coller uniquement dans .env (chmod 600)
openssl rand -hex 32 # ENCRYPTION_KEY
openssl rand -base64 48 # JWT_SECRET / REDIS_PASSWORD / tokens
# PLATFORM_MNEMONIC : 24 mots BIP39 (outil dédié / procédure DEPLOY-VPS)
.envà la racine du clone,chmod 600ENCRYPTION_KEY,JWT_SECRET,REDIS_PASSWORD,INITIAL_SETUP_TOKEN,BREAK_GLASS_TOKEN,PLATFORM_MNEMONICPOSTGRES_*/DATABASE_URLcohérents avec Postgres hôte- Après première mise en service : enregistrer
encryption_key_rotated_at(évite spam admin « Encryption key rotation due »)
URLs & CORS (prod HTTPS)
- DNS A du domaine → IP du VPS (ex.
191.215.41.53) APP_PUBLIC_URL=https://<domaine>:9443(ou 443 via gateway)CORS_ORIGINS= même origine que le front (liste blanche stricte)VITE_API_BASE_URLaligné surAPP_PUBLIC_URL(rebuild web après changement)VITE_WS_URL=wss://…/ws/v1/games/candle-predictCERTBOT_EMAIL/CERTBOT_DOMAIN1pour Let’s Encrypt
Sécurité produit (flags initiaux)
ALLOW_WITHDRAWALS=falsejusqu’à validation dépôtsSWEEP_ENABLED=falsejusqu’au test cold- Turnstile :
TURNSTILE_SITE_KEY+TURNSTILE_SECRET_KEY(web) ; mobile = math viaX-Tloto-Platform - SMTP vérifié :
npm run phase-b:verify-smtp(après clone)
Première mise en route
cd ~/games_app # ou chemin du clone
sudo npm run phase-b:init:https # ou phase-b:init en HTTP test
curl -fsS https://<domaine>:9443/health
# puis /setup avec INITIAL_SETUP_TOKEN
- Super Admin créé + 2FA + recovery codes offline
- 2ᵉ admin recommandé
- Hot wallets seed une fois ; ne plus changer
ENCRYPTION_KEY/PLATFORM_MNEMONICsans runbook rotation - Backup Postgres chiffré hors VPS avant argent réel
Références
- Cutover fresh-install vers nouveau VPS : MIGRATE-TO-NEW-VPS.md
- docs/DEPLOY-VPS.md
- deploy/ENCRYPTION_KEY_ROTATION.md
- deploy/PRODUCTION_SENTRY_CLAMAV.md
- deploy/SECURITY_CSRF.md