Prérequis

  • Docker Desktop

Installation

1. Cloner le dépôt

git clone git@gitlab.article-1.eu:article-1/article1-connect.git
cp .env.example .env
docker-compose -p a1connect up -d

2. Variables d'environnement Docker

Si les ports entrent en conflit avec d'autres projets, surcharger dans .env :

FRONT_DOCKER_EXPOSED_PORT=8082
POSTGRES_DOCKER_EXPOSED_PORT=5432
API_DOCKER_EXPOSED_PORT=3000
RABBITMQ_INTERFACE_DOCKER_EXPOSED_PORT=15672
RABBITMQ_DOCKER_EXPOSED_PORT=5672
MAILCATCHER_DOCKER_EXPOSED_PORT=1025
MAILCATCHER_INTERFACE_DOCKER_EXPOSED_PORT=1080

Sous Linux, pour permettre l'accès à RabbitMQ depuis un autre réseau Docker :

extra_hosts:
  - "host.docker.internal:host-gateway"

3. Base de données

Les migrations sont lancées automatiquement au démarrage Docker — aucune manipulation requise.

Pour inspecter la base avec pgAdmin (télécharger) :

hostname : localhost
port     : 5432
username : postgres
password : <voir docker-compose.yml>

Chemin dans pgAdmin : Servers > <nom> > base de données > CdR_staging > Schemas > API_Schema > Tables

URLs locales

Service URL Credentials
Frontend http://localhost:8082
API http://localhost:3000
RabbitMQ http://localhost:15672 guest / guest
Mailcatcher http://localhost:1080

Déploiement

Environnement Déclencheur
Staging Merge vers la branche staging
Production Merge de staging vers main

Hébergé sur Kubernetes (AdmanTIC). La CI/CD build et pousse les images Docker sur le registre du projet

Problèmes connus

Si l'API (port 3000) ne répond plus :

docker stop a1connect-api && docker start a1connect-api