From 63cdd03c14b8ac1c674b26ec2f46e0131c7399fc Mon Sep 17 00:00:00 2001 From: Gabriel Matte Date: Sat, 7 Dec 2024 17:02:34 -0500 Subject: [PATCH] Ajout de la configuration nginx + quizroom + healtchecks --- .../docs/utilisateur/configuration.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/documentation/docs/utilisateur/configuration.md b/documentation/docs/utilisateur/configuration.md index 8decb56..54677d0 100644 --- a/documentation/docs/utilisateur/configuration.md +++ b/documentation/docs/utilisateur/configuration.md @@ -23,3 +23,61 @@ |---|---|---|---| | `VITE_BACKEND_URL` | URL du backend, y compris le port | http://localhost:4400 | non| | `VITE_AZURE_BACKEND_URL` | URL du backend, y compris le port | http://localhost:4400 | non| + +## Options de Configuration du routeur +| Variable d'Environnement | Description | Exemple | Optionnel défaut | +|---|---|---|---| +| `PORT` | Numero de port sur lequel la NGINX écoute | http://localhost:80 | oui| +| `FRONTEND_HOST` | Url relié au Frontend | http://localhost |oui +| `FRONTEND_PORT` | Port relié au Frontend | http://localhost:5173 | oui| +| `BACKEND_HOST` | Url relié au Backend | http://localhost |oui +| `BACKEND_PORT` | Port relié au Backend | http://localhost:3000 | oui| + +## Options de Configuration de la salle de Quiz +| Variable d'Environnement | Description | Exemple | Optionnel défaut | +|---|---|---|---| +| `PORT` | Numero de port sur lequel la salle écoute | http://localhost:4500 | oui| +| `ROOM_ID` | Numéro de la salle | http://localhost/rooms/000000 | oui| + +## HealthChecks + +### Frontend + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:$${PORT} || exit 1"] + interval: 5s + timeout: 10s + start_period: 5s + retries: 6 + +### Backend + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:$${PORT}/health || exit 1"] + interval: 5s + timeout: 10s + start_period: 5s + retries: 6 + +### Salle de Quiz + healthcheck: + test: ["CMD", "/usr/src/app/healthcheck.sh"] + interval: 5s + timeout: 10s + start_period: 5s + retries: 6 + +### Routeur + healthcheck: + test: ["CMD-SHELL", "wget --spider http://0.0.0.0:$${PORT}/health || exit 1"] + interval: 5s + timeout: 10s + start_period: 5s + retries: 6 + +### MongoDb + + healthcheck: + test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 20s \ No newline at end of file