Environnements
THE HIVE expose trois environnements distincts avec des bases de données et des stockages séparés.
Bases URL
| Env | API | Candidat | Recruteur | Admin |
|---|
| Prod | https://api.wethehivers.com/v1/api | wethehivers.com | recruteur.wethehivers.com | admin.wethehivers.com |
| Staging | https://api-staging.wethehivers.com/v1/api | staging.wethehivers.com | recruteur-staging.wethehivers.com | admin-staging.wethehivers.com |
| Dev | http://localhost:3091/v1/api | localhost:3000 | localhost:3001 | localhost:3002 |
Topologie
Caractéristiques par environnement
| Attribut | Dev | Staging | Prod |
|---|
| SSL | Non | Let’s Encrypt | Cloudflare + LE |
| Rate limiting | Désactivé | 2× prod | Actif |
| Emails réels | Non (MailHog) | Non (test inbox) | Oui |
| Logs niveau | DEBUG | INFO | WARN |
Springdoc /v3/api-docs | Activé | Activé | Désactivé |
| Blacklist JWT | In-memory | Redis | Redis (partagée VPS1/VPS2) |
| Stockage fichiers | MinIO | MinIO | Cloudflare R2 |
| Flyway auto-migrate | Oui | Oui | VPS1 uniquement |
| Backups DB | Non | Quotidien | Horaire + quotidien chiffré |
Statut en temps réel
| Env | Status page |
|---|
| Prod | https://status.wethehivers.com (Uptime Kuma) |
| Staging | Interne |
Secrets par environnement
Ne jamais committer de secret dans le repo. Les variables d’environnement sont toutes masquées dans GitLab CI/CD et chiffrées au repos.
Rotation des tokens
| Token | Rotation |
|---|
| JWT_SECRET | Trimestrielle + après incident |
| R2 access/secret key | Semestrielle |
| SMTP password | Semestrielle |
| DB password | Annuelle (hors incident) |
Connectivité
# Health check — tous env
curl https://api.wethehivers.com/v1/api/actuator/health
curl https://api-staging.wethehivers.com/v1/api/actuator/health
curl http://localhost:3091/v1/api/actuator/health
En production Cloudflare est configuré en orange-cloud proxy. Les vraies IPs clients sont transmises via le header CF-Connecting-IP.