mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Ajout de la configuration nginx + quizroom + healtchecks
This commit is contained in:
parent
58a55ed176
commit
63cdd03c14
1 changed files with 58 additions and 0 deletions
|
|
@ -23,3 +23,61 @@
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| `VITE_BACKEND_URL` | URL du backend, y compris le port | http://localhost:4400 | non|
|
| `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|
|
| `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
|
||||||
Loading…
Reference in a new issue