Skip to content

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-stop

Comment ca marche

Le script infrastructure/scripts/dev.sh :

  1. Demarre PostgreSQL et Redis en Docker (docker compose --profile local up -d)
  2. Genere .env.native a partir du .env racine en remplacant :
    • postgresql-db:5432localhost:25432
    • redis-cache:6379localhost:26379
    • URLs inter-services (http://auth:3000http://localhost:3001, etc.)
  3. Met a jour les symlinks services/<name>/.env../../.env.native
  4. Lance chaque service avec PORT=300X npm run start:dev
  5. Prefixe les logs : [auth:3001], [orchestrator:3004], etc.
  6. 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 --stop

Mode 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 stop

URLs (mode Docker)

ServiceURL
API Gatewayhttp://localhost:8080
Swagger Hubhttp://localhost:28888
Prisma Studiohttp://localhost:25555
CMMShttp://localhost:24028
Backofficehttp://localhost:24029

Ports des services

ServicePortURL
auth3001http://localhost:3001
ledger-wallets3002http://localhost:3002
customer-profiles-kyc3003http://localhost:3003
orchestrator3004http://localhost:3004
notifications3005http://localhost:3005
configuration3006http://localhost:3006
file-service3007http://localhost:3007
providers-gateway3008http://localhost:3008
risk-engine3009http://localhost:3009
service-catalog3010http://localhost:3010
logs-reporting3011http://localhost:3011

Infrastructure Docker :

  • PostgreSQL : localhost:25432
  • Redis : localhost:26379

NxPay — Plateforme fintech CEMAC