docs: Workflow création de compte + refonte documentation
- Ajout Cahier des Charges v1.3 - Ajout Workflow technique création de compte (v1.0) - Réorganisation docs avec préfixes numériques (00_, 01_, etc.) - Ajout données de test CSV - Modifications principales : * Champ téléphone unique (suppression mobile/fixe) * Inscription sans mot de passe (Parents + AM) * Création MDP par email après validation (7j) * Genre enfant obligatoire (H/F) * Date agrément obligatoire pour AM
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
# 🚀 Déploiement YNOV - Architecture Complète
|
||||
|
||||
## 🌐 URLs d'accès
|
||||
|
||||
- **Application principale** : https://ynov.ptits-pas.fr/
|
||||
- **API Backend** : https://ynov.ptits-pas.fr/api/
|
||||
- **Administration DB** : https://ynov.ptits-pas.fr/pgadmin/
|
||||
|
||||
## 🏗️ Architecture
|
||||
|
||||
```
|
||||
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
||||
│ Frontend │ │ Backend │ │ Database │
|
||||
│ (Flutter) │───▶│ (NestJS) │───▶│ (PostgreSQL) │
|
||||
│ ynov-frontend │ │ ynov-backend │ │ ynov-postgres │
|
||||
│ Port: 80 │ │ Port: 3000 │ │ Port: 5432 │
|
||||
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
||||
│ │ │
|
||||
└───────────────────────┼───────────────────────┘
|
||||
│
|
||||
ynov_network (réseau interne)
|
||||
│
|
||||
proxy_network (Traefik)
|
||||
│
|
||||
Internet
|
||||
```
|
||||
|
||||
## 📁 Structure des fichiers
|
||||
|
||||
```
|
||||
/home/ynov/project/
|
||||
├── docker-compose.yml # Orchestration globale
|
||||
├── backend/
|
||||
│ ├── Dockerfile # Build NestJS
|
||||
│ ├── src/ # Code source
|
||||
│ └── package.json # Dépendances
|
||||
├── frontend/
|
||||
│ └── frontend/
|
||||
│ ├── Dockerfile # Build Flutter
|
||||
│ ├── pubspec.yaml # Config Flutter
|
||||
│ └── lib/ # Code source
|
||||
└── database/
|
||||
├── docker-compose.yml # Config spécifique DB
|
||||
└── migrations/ # Scripts SQL
|
||||
```
|
||||
|
||||
## 🔑 Credentials
|
||||
|
||||
### Base de données
|
||||
- **Host** : `ynov-postgres` (interne) ou `localhost:5433` (externe)
|
||||
- **User** : `admin`
|
||||
- **Password** : `admin123`
|
||||
- **Database** : `ptitpas_db`
|
||||
|
||||
### PgAdmin
|
||||
- **Email** : `admin@ynov.local`
|
||||
- **Password** : `admin123`
|
||||
|
||||
## 🚀 Commandes de déploiement
|
||||
|
||||
### Déploiement complet
|
||||
```bash
|
||||
cd /home/ynov/project
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
### Déploiement par service
|
||||
```bash
|
||||
# Base de données seulement
|
||||
docker compose up -d database pgadmin
|
||||
|
||||
# Backend seulement
|
||||
docker compose up -d --build backend
|
||||
|
||||
# Frontend seulement
|
||||
docker compose up -d --build frontend
|
||||
```
|
||||
|
||||
### Monitoring
|
||||
```bash
|
||||
# Voir les logs
|
||||
docker compose logs -f
|
||||
|
||||
# Statut des services
|
||||
docker compose ps
|
||||
|
||||
# Redémarrer un service
|
||||
docker compose restart backend
|
||||
```
|
||||
|
||||
## 🔧 Configuration réseau
|
||||
|
||||
### Réseaux Docker
|
||||
- **ynov_network** : Communication interne entre services
|
||||
- **proxy_network** : Exposition via Traefik
|
||||
|
||||
### Priorités Traefik
|
||||
- **Frontend** : Priority 10 (plus basse = défaut)
|
||||
- **Backend** : Priority 20
|
||||
- **PgAdmin** : Priority 30 (plus haute = prioritaire)
|
||||
|
||||
## 📝 Variables d'environnement
|
||||
|
||||
### Backend
|
||||
- `DATABASE_URL` : Connexion PostgreSQL
|
||||
- `NODE_ENV` : Mode production
|
||||
|
||||
### Frontend
|
||||
- `API_URL` : URL de l'API backend
|
||||
|
||||
## 🔄 Webhooks de déploiement
|
||||
|
||||
### Repository Frontend
|
||||
- **Trigger** : Push sur `main`
|
||||
- **Action** : `docker compose up -d --build frontend`
|
||||
|
||||
### Repository Backend
|
||||
- **Trigger** : Push sur `main`
|
||||
- **Action** : `docker compose up -d --build backend`
|
||||
|
||||
### Repository Database
|
||||
- **Trigger** : Push sur `main`
|
||||
- **Action** : `docker compose up -d --build database`
|
||||
|
||||
## 🛠️ Dépannage
|
||||
|
||||
### Logs par service
|
||||
```bash
|
||||
docker compose logs frontend
|
||||
docker compose logs backend
|
||||
docker compose logs database
|
||||
```
|
||||
|
||||
### Rebuild complet
|
||||
```bash
|
||||
docker compose down
|
||||
docker compose up -d --build --force-recreate
|
||||
```
|
||||
|
||||
### Vérifier la connectivité réseau
|
||||
```bash
|
||||
docker network ls
|
||||
docker network inspect project_ynov_network
|
||||
```
|
||||
Reference in New Issue
Block a user