Dev local
Deux modes de developpement : natif (recommande) et Docker.
Mode natif (recommande)
Lance les microservices directement sur la machine (npm run start:dev). Seuls PostgreSQL et Redis restent en containers Docker.
Avantages :
- Economise ~2 Go d'espace disque (pas d'images Docker par service)
- Hot-reload plus rapide (pas de couche Docker)
- Logs unifies dans un seul terminal
Demarrage
bash
# Tout lancer (infra + 11 services)
make dev
# Lancer seulement quelques services
make dev SERVICES="auth orchestrator configuration"
# Lancer seulement l'infra (PostgreSQL + Redis)
make dev-infra
# Ajouter des services apres (infra deja up)
make dev SERVICES="auth"Arreter
bash
# Ctrl+C dans le terminal arrete tous les services
# Arreter l'infra Docker + restaurer la config Docker
make dev-stopComment ca marche
Le script infrastructure/scripts/dev.sh :
- Demarre PostgreSQL et Redis en Docker (
docker compose --profile local up -d) - Genere
.env.nativea partir du.envracine en remplacant :postgresql-db:5432→localhost:25432redis-cache:6379→localhost:26379- URLs inter-services (
http://auth:3000→http://localhost:3001, etc.)
- Met a jour les symlinks
services/<name>/.env→../../.env.native - Lance chaque service avec
PORT=300X npm run start:dev - Prefixe les logs :
[auth:3001],[orchestrator:3004], etc. - Arret propre de tous les processus sur Ctrl+C
Options avancees
bash
./infrastructure/scripts/dev.sh --help
./infrastructure/scripts/dev.sh --no-infra auth orchestrator
./infrastructure/scripts/dev.sh --infra-only
./infrastructure/scripts/dev.sh --stopMode Docker
Lance tout en containers (11 services + infra + nginx + swagger + prisma-studio).
bash
# Choisir l'environnement
make env-local # DB locale en container
make env-railway # DB distante Railway
# Demarrer
make start # Services uniquement
make dashboard-start # CMMS + Backoffice
make all # Tout
# Arreter
make stopURLs (mode Docker)
| Service | URL |
|---|---|
| API Gateway | http://localhost:8080 |
| Swagger Hub | http://localhost:28888 |
| Prisma Studio | http://localhost:25555 |
| CMMS | http://localhost:24028 |
| Backoffice | http://localhost:24029 |
Ports des services
| Service | Port | URL |
|---|---|---|
| auth | 3001 | http://localhost:3001 |
| ledger-wallets | 3002 | http://localhost:3002 |
| customer-profiles-kyc | 3003 | http://localhost:3003 |
| orchestrator | 3004 | http://localhost:3004 |
| notifications | 3005 | http://localhost:3005 |
| configuration | 3006 | http://localhost:3006 |
| file-service | 3007 | http://localhost:3007 |
| providers-gateway | 3008 | http://localhost:3008 |
| risk-engine | 3009 | http://localhost:3009 |
| service-catalog | 3010 | http://localhost:3010 |
| logs-reporting | 3011 | http://localhost:3011 |
Infrastructure Docker :
- PostgreSQL :
localhost:25432 - Redis :
localhost:26379