Débloque le chantier d'isolation admin (G15). ADM-R2 : la suppression admin annule désormais l'abonnement Stripe avant d'effacer le compte, sans bloquer sur un échec fournisseur (journalisé). ADM-R3 : premium_active_clause() remplace is_premium brut dans les comptages/filtres admin. Ajoute admin_audit_log (sans FK), la limitation de débit sur /api/admin, le refus de démarrage sous 32 caractères pour ADMIN_TOKEN, les en-têtes Caddy dédiés, et la segmentation locale sur growth_events (migrations 0034/0035). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
43 lines
1.3 KiB
Text
43 lines
1.3 KiB
Text
# PostgreSQL
|
|
POSTGRES_USER=platform
|
|
POSTGRES_PASSWORD=changeme
|
|
POSTGRES_DB=platform
|
|
DATABASE_URL=postgresql+asyncpg://platform:changeme@kankwa-db:5432/platform
|
|
|
|
# JWT
|
|
SECRET_KEY=changeme_long_random_string_min_32_chars
|
|
ALGORITHM=HS256
|
|
ACCESS_TOKEN_EXPIRE_MINUTES=15
|
|
REFRESH_SESSION_DAYS=30
|
|
MAGIC_LINK_EXPIRE_MINUTES=15
|
|
CO_OWNER_INVITE_EXPIRE_MINUTES=10080
|
|
|
|
# Brevo (emails)
|
|
BREVO_API_KEY=xkeysib-xxxx
|
|
FROM_EMAIL=noreply@tondomaine.com
|
|
FROM_NAME=Kankwa
|
|
|
|
# Stripe (Phase 9 — abonnement Premium)
|
|
STRIPE_SECRET_KEY=sk_live_xxxx
|
|
STRIPE_PUBLISHABLE_KEY=pk_live_xxxx
|
|
STRIPE_WEBHOOK_SECRET=whsec_xxxx
|
|
STRIPE_PRICE_MONTHLY=price_xxxx # 1,99 €/mois
|
|
STRIPE_PRICE_ANNUAL=price_xxxx # 19,99 €/an
|
|
|
|
# App
|
|
FRONTEND_URL=https://tondomaine.com
|
|
ENVIRONMENT=production
|
|
# Caddy rejoint l'API depuis le bridge Docker privé. Ne jamais inclure ici un
|
|
# réseau depuis lequel des clients Internet peuvent joindre directement l'API.
|
|
TRUSTED_PROXY_NETWORKS=172.16.0.0/12
|
|
|
|
# Freemium
|
|
MAX_FREE_ACTIVE_SERVICES=3
|
|
|
|
# Dashboard first-party, sans interface admin
|
|
OPERATIONS_TOKEN=replace-with-a-random-operations-token
|
|
|
|
# Interface admin (/admin, /api/admin/*) — jeton unique, refusé au démarrage
|
|
# s'il fait moins de 32 caractères. Générer avec :
|
|
# python3 -c "import secrets; print(secrets.token_urlsafe(32))"
|
|
ADMIN_TOKEN=replace-with-a-random-admin-token-min-32-chars
|