- Configure LOG_DIR=/var/log/veza pour tous les services - Ajoute scripts de gestion des logs (setup, view, rotate) - Configure volume Docker partagé pour les logs - Logs organisés par service avec fichiers séparés pour les erreurs - Rotation automatique : 100MB, 10 backups, 30 jours, compression gzip - Documentation dans LOGGING.md et ENV_CONFIG.md Services configurés: - Backend API: backend-api.log, redis.log, db.log, rabbitmq.log - Chat Server: chat-server.log (à configurer) - Stream Server: stream-server.log (à configurer) Le backend API a déjà toute l'infrastructure de logging en place. Les serveurs chat et stream utiliseront LOG_DIR depuis l'environnement.
74 lines
1.3 KiB
Markdown
74 lines
1.3 KiB
Markdown
# Configuration des Variables d'Environnement
|
|
|
|
## Backend API
|
|
|
|
Pour activer le logging centralisé vers `/var/log/veza`, ajoutez ces variables à votre fichier `.env` :
|
|
|
|
```bash
|
|
# Logging Configuration
|
|
LOG_DIR=/var/log/veza
|
|
LOG_LEVEL=INFO
|
|
```
|
|
|
|
Variables complètes recommandées :
|
|
|
|
```bash
|
|
# Application
|
|
APP_ENV=development
|
|
APP_PORT=8080
|
|
LOG_LEVEL=INFO
|
|
LOG_DIR=/var/log/veza
|
|
|
|
# Database
|
|
DATABASE_URL=postgresql://veza:password@localhost:5432/veza
|
|
|
|
# Redis
|
|
REDIS_URL=redis://localhost:6379
|
|
REDIS_ENABLE=true
|
|
|
|
# RabbitMQ
|
|
RABBITMQ_URL=amqp://veza:password@localhost:5672/%2f
|
|
RABBITMQ_ENABLE=true
|
|
|
|
# Security
|
|
JWT_SECRET=your-secret-key-here-change-in-production
|
|
CORS_ALLOWED_ORIGINS=http://localhost:3000
|
|
|
|
# Services
|
|
STREAM_SERVER_URL=http://localhost:8082
|
|
CHAT_SERVER_URL=http://localhost:8081
|
|
```
|
|
|
|
## Chat Server
|
|
|
|
Pour le serveur de chat, ajoutez :
|
|
|
|
```bash
|
|
LOG_DIR=/var/log/veza
|
|
LOG_LEVEL=INFO
|
|
```
|
|
|
|
## Stream Server
|
|
|
|
Pour le serveur de streaming, ajoutez :
|
|
|
|
```bash
|
|
LOG_DIR=/var/log/veza
|
|
LOG_LEVEL=INFO
|
|
```
|
|
|
|
## Docker Production
|
|
|
|
Les variables sont déjà configurées dans `docker-compose.prod.yml`. Assurez-vous de définir :
|
|
|
|
```bash
|
|
export DB_PASSWORD=your-db-password
|
|
export RABBITMQ_PASSWORD=your-rabbitmq-password
|
|
export JWT_SECRET=your-jwt-secret
|
|
```
|
|
|
|
Avant de lancer :
|
|
|
|
```bash
|
|
docker-compose -f docker-compose.prod.yml up -d
|
|
```
|