🎯 Exemples recommandés
Balanced sample collections from various categories for you to explore
Exemples de Variables d'Environnement (.env)
Exemples de configuration de variables d'environnement pour différents types d'applications et environnements
⚙️ Variables d'Environnement d'Application Web
🟢 simple
Configuration typique de variables d'environnement pour application web
# Basic Web Application Environment Variables
# =============================================
# Application Settings
NODE_ENV=production
PORT=3000
HOST=0.0.0.0
APP_NAME=MyWebApp
APP_VERSION=2.1.0
APP_URL=https://example.com
# Server Configuration
SERVER_TIMEOUT=30000
KEEP_ALIVE_TIMEOUT=65000
MAX_CONNECTIONS=1000
COMPRESSION_ENABLED=true
CORS_ENABLED=true
# Security Settings
JWT_SECRET=your-super-secret-jwt-key-here-change-in-production
JWT_EXPIRES_IN=7d
BCRYPT_ROUNDS=12
SESSION_SECRET=your-session-secret-here-change-this
CSRF_SECRET=your-csrf-secret-here
# File Upload Settings
MAX_FILE_SIZE=10485760
UPLOAD_DIR=uploads
ALLOWED_FILE_TYPES=jpg,jpeg,png,gif,pdf,doc,docx
# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
RATE_LIMIT_SKIP_SUCCESSFUL_REQUESTS=false
# Application Features
FEATURE_DARK_MODE=true
FEATURE_BETA_ACCESS=false
FEATURE_API_V2=true
FEATURE_WEBHOOKS=true
⚙️ Configuration de Connexion de Base de Données
🟡 intermediate
Variables d'environnement pour connexion de base de données et cache
# Database Configuration
# ===================
# Primary Database (PostgreSQL)
DB_TYPE=postgresql
DB_HOST=localhost
DB_PORT=5432
DB_NAME=myapp_production
DB_USER=app_user
DB_PASSWORD=secure_database_password_here
DB_SSL=true
DB_POOL_MIN=2
DB_POOL_MAX=20
DB_TIMEOUT=30000
DB_IDLE_TIMEOUT=300000
DB_RECONNECT_INTERVAL=5000
# Database URL Alternative (use instead of individual settings)
DATABASE_URL=postgresql://app_user:secure_password@localhost:5432/myapp_production?sslmode=require
# Read Replica Configuration
DB_REPLICA_HOST=replica.example.com
DB_REPLICA_PORT=5432
DB_REPLICA_NAME=myapp_replica
DB_REPLICA_USER=replica_user
DB_REPLICA_PASSWORD=replica_password
# Redis Cache Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=redis_password_here
REDIS_DB=0
REDIS_TTL=3600
REDIS_CLUSTER_ENABLED=false
# Redis Cluster Configuration
REDIS_CLUSTER_NODES=redis1.example.com:6379,redis2.example.com:6379,redis3.example.com:6379
REDIS_CLUSTER_PASSWORD=cluster_password
# MongoDB Configuration (if using MongoDB)
MONGO_URI=mongodb://localhost:27017/myapp
MONGO_USER=mongo_user
MONGO_PASSWORD=mongo_password
MONGO_OPTIONS=retryWrites=true&w=majority
# Elasticsearch Configuration (if using)
ELASTICSEARCH_URL=http://localhost:9200
ELASTICSEARCH_USERNAME=elastic_user
ELASTICSEARCH_PASSWORD=elastic_password
ELASTICSEARCH_INDEX_PREFIX=myapp
# Database Migration Settings
DB_MIGRATE_ON_START=true
DB_SEED_DATA=false
DB_BACKUP_BEFORE_MIGRATION=true
⚙️ Clés API et Services Tiers
🟡 intermediate
Configuration d'intégration API et services externes
# Third-Party API Keys and Services
# =================================
# Email Services
SENDGRID_API_KEY=SG.sendgrid-api-key-here
[email protected]
EMAIL_FROM_NAME=MyWebApp
# SMTP Configuration (alternative to SendGrid)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
[email protected]
SMTP_PASSWORD=your-app-password
# Payment Processing
STRIPE_PUBLISHABLE_KEY=pk_live_your_publishable_key
STRIPE_SECRET_KEY=sk_live_your_secret_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
# Cloud Storage
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_REGION=us-west-2
AWS_S3_BUCKET=myapp-files
AWS_CLOUDFRONT_DOMAIN=cdn.example.com
# Google Services
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_MAPS_API_KEY=your-google-maps-api-key
GOOGLE_ANALYTICS_ID=GA_MEASUREMENT_ID
GOOGLE_TAG_MANAGER_ID=GTM-XXXXXXX
# Social Media APIs
FACEBOOK_APP_ID=your-facebook-app-id
FACEBOOK_APP_SECRET=your-facebook-app-secret
TWITTER_API_KEY=your-twitter-api-key
TWITTER_API_SECRET=your-twitter-api-secret
TWITTER_ACCESS_TOKEN=your-twitter-access-token
TWITTER_ACCESS_TOKEN_SECRET=your-twitter-access-token-secret
# Authentication Providers
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
LINKEDIN_CLIENT_ID=your-linkedin-client-id
LINKEDIN_CLIENT_SECRET=your-linkedin-client-secret
# CDN Services
CLOUDFLARE_API_TOKEN=your-cloudflare-api-token
CLOUDFLARE_ZONE_ID=your-cloudflare-zone-id
# Push Notifications
FIREBASE_SERVER_KEY=your-firebase-server-key
FCM_SENDER_ID=your-fcm-sender-id
# Analytics and Monitoring
SENTRY_DSN=https://[email protected]/project-id
LOGDNA_API_KEY=your-logdna-api-key
DATADOG_API_KEY=your-datadog-api-key
NEW_RELIC_LICENSE_KEY=your-newrelic-license-key
# Communication Services
SLACK_BOT_TOKEN=xoxb-your-slack-bot-token
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/id/token
# Search Services
ALGOLIA_APPLICATION_ID=your-algolia-app-id
ALGOLIA_ADMIN_API_KEY=your-algolia-admin-key
ALGOLIA_SEARCH_API_KEY=your-algolia-search-key
# Video Processing
VIMEO_ACCESS_TOKEN=your-vimeo-access-token
VIMEO_CLIENT_ID=your-vimeo-client-id
VIMEO_CLIENT_SECRET=your-vimeo-client-secret
# SMS Services
TWILIO_ACCOUNT_SID=your-twilio-account-sid
TWILIO_AUTH_TOKEN=your-twilio-auth-token
TWILIO_PHONE_NUMBER=+1234567890
⚙️ Configuration d'Environnement de Développement
🟡 intermediate
Configuration d'outils de développement et débogage
# Development Environment Configuration
# ===================================
# Basic Development Settings
NODE_ENV=development
DEBUG=true
LOG_LEVEL=debug
VERBOSE=true
# Server Configuration
PORT=3000
HOST=localhost
AUTO_RESTART=true
LIVERELOAD=true
# Database Development
DB_HOST=localhost
DB_PORT=5432
DB_NAME=myapp_development
DB_USER=dev_user
DB_PASSWORD=dev_password
DB_SSL=false
# Redis Development
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=1
REDIS_PASSWORD=
# API Development Settings
API_TIMEOUT=30000
API_RETRY_ATTEMPTS=3
MOCK_EXTERNAL_APIS=true
# File Upload Development
UPLOAD_DIR=dev-uploads
MAX_FILE_SIZE=52428800
ALLOWED_FILE_TYPES=*
# Authentication Development
JWT_SECRET=dev-jwt-secret-key-not-for-production
JWT_EXPIRES_IN=24h
SESSION_SECRET=dev-session-secret-not-for-production
# Email Development (Mailhog for local testing)
SMTP_HOST=localhost
SMTP_PORT=1025
SMTP_USER=
SMTP_PASSWORD=
[email protected]
# Logging Development
LOG_FILE=./logs/dev.log
LOG_CONSOLE=true
LOG_COLOR=true
LOG_TIMESTAMP=true
# Development Tools
WEBPACK_DEV_SERVER_PORT=8080
HOT_RELOAD=true
SOURCE_MAPS=true
MINIMIZE=false
BUNDLE_ANALYZER=true
# Testing Configuration
TEST_DATABASE=myapp_test
TEST_TIMEOUT=5000
TEST_PARALLEL=true
TEST_COVERAGE=true
# Feature Flags (Development)
FEATURE_DEBUG_TOOLBAR=true
FEATURE_DEBUG_ROUTES=true
FEATURE_MOCK_DATA=true
FEATURE_API_DOCS=true
FEATURE_PERFORMANCE_MONITORING=true
# Browser Sync (if using)
BROWSER_SYNC_PORT=3001
BROWSER_SYNC_PROXY=localhost:3000
# Development APIs
GOOGLE_CLIENT_ID=dev-google-client-id
STRIPE_PUBLISHABLE_KEY=pk_test_dev_key
# Development URLs
FRONTEND_URL=http://localhost:3000
API_URL=http://localhost:3000
WEBPACK_DEV_URL=http://localhost:8080
# Debug Tools
REDIS_COMMANDER_PORT=8081
PGADMIN_PORT=5050
MAILHOG_PORT=8025
# Database Management
DB_SEED_DATA=true
DB_SAMPLE_DATA=true
DB_RESET_ON_START=false
# Cache Settings
CACHE_ENABLED=false
CACHE_TTL=300
# SSL Development
SSL_ENABLED=false
FORCE_HTTPS=false
# Rate Limiting Development
RATE_LIMIT_ENABLED=false
RATE_LIMIT_MAX_REQUESTS=1000
# Security Development
HELMET_ENABLED=false
CORS_ENABLED=true
CORS_ORIGIN=http://localhost:3000,http://localhost:8080
# Environment-specific Paths
NODE_PATH=./src
PUBLIC_PATH=./public
BUILD_PATH=./dist
# Development Scripts
NPM_RUN_DEV=npm run dev
NPM_RUN_BUILD=npm run build
NPM_RUN_TEST=npm run test
# IDE and Editor Configuration
VSCODE_DEBUG_PORT=9229
INSPECTOR_ENABLED=true
⚙️ Configuration d'Environnement de Production
🔴 complex
Variables de configuration spécifiques à la production
# Production Environment Configuration
# ===================================
# Basic Production Settings
NODE_ENV=production
DEBUG=false
LOG_LEVEL=error
VERBOSE=false
# Security Configuration
HTTPS_ONLY=true
FORCE_HTTPS=true
SECURE_COOKIES=true
TRUST_PROXY=true
HELMET_ENABLED=true
RATE_LIMIT_ENABLED=true
WAF_ENABLED=true
# SSL/TLS Configuration
SSL_CERT_PATH=/etc/ssl/certs/server.crt
SSL_KEY_PATH=/etc/ssl/private/server.key
SSL_CA_PATH=/etc/ssl/certs/ca-bundle.crt
# Performance Settings
CLUSTER_WORKERS=0
ENABLE_GZIP=true
ENABLE_BROTLI=true
CACHE_TTL=86400
STATIC_CACHE_TTL=31536000
# Monitoring and Observability
NEW_RELIC_ENABLED=true
NEW_RELIC_APP_NAME=MyWebApp-Production
NEW_RELIC_LICENSE_KEY=your-newrelic-production-license
SENTRY_DSN=https://[email protected]/project-id
SENTRY_ENVIRONMENT=production
PROMETHEUS_ENABLED=true
PROMETHEUS_PORT=9090
# Logging Configuration
LOG_FILE=/var/log/myapp/application.log
LOG_MAX_SIZE=100m
LOG_MAX_FILES=10
LOG_DATE_FORMAT=ISO8601
LOG_FORMAT=json
# Database Production Settings
DB_SSL_MODE=require
DB_SSL_CERT=/etc/ssl/certs/client.crt
DB_SSL_KEY=/etc/ssl/private/client.key
DB_POOL_MIN=10
DB_POOL_MAX=50
DB_TIMEOUT=10000
# Cache Production Settings
REDIS_CLUSTER_ENABLED=true
REDIS_SENTINEL_ENABLED=true
REDIS_SENTINEL_NAME=mymaster
REDIS_SENTINEL_HOSTS=redis1.example.com:26379,redis2.example.com:26379,redis3.example.com:26379
# Session Store
SESSION_STORE=redis
SESSION_TTL=86400
SESSION_SECURE=true
# CDN Configuration
CDN_ENABLED=true
CDN_HOST=cdn.example.com
CDN_PROTOCOL=https
STATIC_URL=https://cdn.example.com/static
# File Storage Production
STORAGE_PROVIDER=s3
S3_BUCKET=myapp-production-files
S3_REGION=us-west-2
S3_VERSIONING=true
S3_ENCRYPTION=AES256
# Email Production Settings
EMAIL_PROVIDER=sendgrid
[email protected]
[email protected]
# Backup Configuration
BACKUP_ENABLED=true
BACKUP_SCHEDULE=0 2 * * *
BACKUP_RETENTION_DAYS=30
BACKUP_STORAGE=s3
BACKUP_S3_BUCKET=myapp-backups
# Security Headers
CSP_ENABLED=true
CSP_POLICY=default-src 'self'
HSTS_ENABLED=true
HSTS_MAX_AGE=31536000
XFRAME_OPTIONS=DENY
XCONTENT_TYPE_OPTIONS=nosniff
# API Configuration
API_RATE_LIMIT=1000
API_BURST_LIMIT=100
API_TIMEOUT=30000
API_KEY_ROTATION_ENABLED=true
# Feature Flags
FEATURE_MAINTENANCE_MODE=false
FEATURE_BETA_FEATURES=false
FEATURE_DEBUG_MODE=false
FEATURE_ANALYTICS=true
FEATURE_PERFORMANCE_MONITORING=true
# External Service URLs
EXTERNAL_API_BASE_URL=https://api.example.com
WEBHOOK_BASE_URL=https://webhook.example.com
PAYMENT_CALLBACK_URL=https://api.example.com/payments/callback
# Emergency Settings
EMERGENCY_MODE=false
EMERGENCY_MESSAGE=System under maintenance. Please try again later.
EMERGENCY_ALLOW_ADMIN_ACCESS=true
# Scaling and Load Balancing
ENABLE_CLUSTERING=true
WORKER_PROCESSES=auto
GRACEFUL_SHUTDOWN_TIMEOUT=30000
HEALTH_CHECK_INTERVAL=30000
⚙️ Configuration de Conteneur Docker
🔴 complex
Variables d'environnement pour application Dockerisée
# Docker Container Environment Variables
# =======================================
# Container Identification
CONTAINER_NAME=myapp-container
CONTAINER_VERSION=latest
INSTANCE_ID=prod-instance-001
# Docker Networking
HOST=0.0.0.0
PORT=3000
EXPOSED_PORTS=3000,9090
# Docker Runtime
DOCKER_ENV=docker
NAMESPACE=default
POD_NAME=myapp-pod
SERVICE_NAME=myapp-service
# Container Resources
NODE_OPTIONS=--max-old-space-size=2048
UV_THREADPOOL_SIZE=128
# Container Health
HEALTH_CHECK_ENDPOINT=/health
HEALTH_CHECK_INTERVAL=30
HEALTH_CHECK_TIMEOUT=10
HEALTH_CHECK_RETRIES=3
# Docker Volume Paths
APP_PATH=/app
LOG_PATH=/app/logs
UPLOAD_PATH=/app/uploads
CONFIG_PATH=/app/config
# Docker Compose Integration
COMPOSE_PROJECT_NAME=myapp
COMPOSE_FILE=docker-compose.yml
COMPOSE_PROJECT_DOCKER_NETWORK=myapp-network
# Container Orchestration (Kubernetes)
KUBERNETES_NAMESPACE=default
KUBERNETES_POD_NAME=myapp-pod-12345
KUBERNETES_SERVICE_NAME=myapp-service
KUBERNETES_DEPLOYMENT_NAME=myapp-deployment
# Docker Secrets (when using Docker Swarm)
DOCKER_SECRETS_ENABLED=true
DB_PASSWORD_FILE=/run/secrets/db_password
JWT_SECRET_FILE=/run/secrets/jwt_secret
# Environment Labels and Metadata
ENVIRONMENT_LABEL=production
TEAM_LABEL=backend
VERSION_LABEL=2.1.0
BUILD_NUMBER=123
COMMIT_SHA=abc123def456
# Docker Registry
DOCKER_REGISTRY=registry.example.com
IMAGE_TAG=2.1.0
IMAGE_PULL_POLICY=IfNotPresent
# Container Monitoring
PROMETHEUS_MULTIPROC_DIR=/tmp/prometheus
METRICS_ENABLED=true
METRICS_PORT=9090
# Container Logging
LOG_DRIVER=json-file
LOG_OPT_MAX_SIZE=10m
LOG_OPT_MAX_FILE=3
LOG_FORMAT=json
# Container Security
DOCKER_USER=1001
DOCKER_GROUP=1001
READ_ONLY_FILESYSTEM=false
DROP_CAPABILITIES=true
NO_NEW_PRIVILEGES=true
# Container Configuration Files
CONFIG_FILE=/app/config/production.json
ENV_FILE=/app/.env.production
SECRETS_DIR=/run/secrets
# Container Networking
INTERNAL_API_URL=http://api-service:3000
INTERNAL_DB_URL=http://postgres-service:5432
INTERNAL_REDIS_URL=http://redis-service:6379
# Container Backup and Recovery
BACKUP_ENABLED=true
BACKUP_SCHEDULE=0 2 * * *
BACKUP_CONTAINER_NAME=myapp-backup
RESTORE_ON_START=false
# Container Scaling
CLUSTER_WORKERS=os.cpus().length
WORKER_CONNECTIONS=1000
GRACEFUL_SHUTDOWN_TIMEOUT=30000
# Docker Development vs Production
IS_DOCKER_DEVELOPMENT=false
DOCKER_DEV_VOLUME_BIND=true
DOCKER_DEV_LIVE_RELOAD=true
# Container Health Endpoints
HEALTH_ENDPOINT_STATUS=http://localhost:3000/health
HEALTH_ENDPOINT_READY=http://localhost:3000/ready
HEALTH_ENDPOINT_LIVE=http://localhost:3000/live
# Container Resource Limits
MEMORY_LIMIT=2g
CPU_LIMIT=2
DISK_LIMIT=10g
# Container Environment Detection
CONTAINER_ENV=docker
VIRTUAL_ENV=/app/venv
PYTHONPATH=/app
# Docker Service Discovery
CONSUL_HOST=consul.example.com
CONSUL_PORT=8500
CONSUL_ENABLED=true
SERVICE_DISCOVERY_ENABLED=true
# Container Configuration Hot Reload
CONFIG_HOT_RELOAD=false
SECRETS_HOT_RELOAD=false
# Docker Multi-stage Build Variables
BUILD_TARGET=production
BUILD_PLATFORM=linux/amd64
BUILD_ARGS=NPM_TOKEN=${NPM_TOKEN}
⚙️ Configuration de Surveillance et Journalisation
🔴 complex
Paramètres de surveillance et journalisation d'application
# Monitoring and Observability Configuration
# =========================================
# Application Monitoring
MONITORING_ENABLED=true
SERVICE_NAME=myapp
SERVICE_VERSION=2.1.0
ENVIRONMENT=production
INSTANCE_ID=prod-instance-001
# Prometheus Metrics
PROMETHEUS_ENABLED=true
PROMETHEUS_PORT=9090
PROMETHEUS_ENDPOINT=/metrics
PROMETHEUS_LABELS=app=myapp,env=production
PROMETHEUS_PUSHGATEWAY_URL=http://pushgateway.example.com
# Distributed Tracing
TRACING_ENABLED=true
JAEGER_ENDPOINT=http://jaeger.example.com:14268/api/traces
JAEGER_SAMPLER_TYPE=probabilistic
JAEGER_SAMPLER_PARAM=0.1
TRACING_SERVICE_NAME=myapp
# Application Logs
LOG_LEVEL=info
LOG_FORMAT=json
LOG_STRUCTURED=true
LOG_INCLUDE_TIMESTAMP=true
LOG_INCLUDE_TRACE_ID=true
LOG_INCLUDE_USER_ID=true
# Log Shipping
LOG_SHIPPING_ENABLED=true
LOG_SHIPPER=fluentd
FLUENTD_HOST=fluentd.example.com
FLUENTD_PORT=24224
FLUENTD_TAG=myapp.logs
# Error Tracking
SENTRY_ENABLED=true
SENTRY_DSN=https://[email protected]/project-id
SENTRY_ENVIRONMENT=production
SENTRY_TRACES_SAMPLE_RATE=0.1
SENTRY_DEBUG=false
# APM (Application Performance Monitoring)
NEW_RELIC_ENABLED=true
NEW_RELIC_APP_NAME=MyWebApp-Production
NEW_RELIC_LICENSE_KEY=your-newrelic-license-key
NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
NEW_RELIC_LOGGING_ENABLED=true
# Datadog Monitoring
DATADOG_ENABLED=true
DATADOG_API_KEY=your-datadog-api-key
DATADOG_APP_KEY=your-datadog-app-key
DATADOG_SITE=datadoghq.com
DD_SERVICE=myapp
DD_ENV=production
DD_VERSION=2.1.0
# Health Check Configuration
HEALTH_CHECK_ENABLED=true
HEALTH_CHECK_PORT=8080
HEALTH_CHECK_PATH=/health
HEALTH_CHECK_INTERVAL=30
HEALTH_CHECK_TIMEOUT=10
# Liveness and Readiness Probes
LIVENESS_PROBE_ENDPOINT=/live
READINESS_PROBE_ENDPOINT=/ready
STARTUP_PROBE_ENDPOINT=/startup
# Metrics Collection
METRICS_COLLECTION_INTERVAL=15
METRICS_RETENTION_DAYS=30
METRICS_BATCH_SIZE=100
# Custom Business Metrics
BUSINESS_METRICS_ENABLED=true
USER_REGISTRATIONS_COUNTER=true
ORDER_PROCESSING_TIME=true
PAYMENT_SUCCESS_RATE=true
FEATURE_USAGE_TRACKING=true
# Performance Monitoring
PERFORMANCE_MONITORING_ENABLED=true
SLOW_QUERY_THRESHOLD=1000
SLOW_REQUEST_THRESHOLD=2000
MEMORY_USAGE_THRESHOLD=80
CPU_USAGE_THRESHOLD=70
# Alert Configuration
ALERTING_ENABLED=true
ALERT_WEBHOOK_URL=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
[email protected]
[email protected]
# Custom Alert Rules
ALERT_ERROR_RATE_THRESHOLD=5
ALERT_RESPONSE_TIME_THRESHOLD=5000
ALERT_MEMORY_THRESHOLD=90
ALERT_CPU_THRESHOLD=85
ALERT_DISK_THRESHOLD=95
# Log Aggregation
LOG_AGGREGATION_ENABLED=true
ELASTICSEARCH_URL=http://elasticsearch.example.com:9200
ELASTICSEARCH_INDEX=myapp-logs
LOGSTASH_URL=http://logstash.example.com:5044
# Security Monitoring
SECURITY_MONITORING_ENABLED=true
FAILED_LOGIN_ALERT_THRESHOLD=10
SUSPICIOUS_ACTIVITY_ENABLED=true
RATE_LIMIT_MONITORING=true
AUTHENTICATION_TRACKING=true
# Database Monitoring
DB_MONITORING_ENABLED=true
DB_SLOW_QUERY_LOG=true
DB_CONNECTION_POOL_MONITORING=true
DB_QUERY_ANALYTICS=true
# Cache Monitoring
REDIS_MONITORING_ENABLED=true
REDIS_SLOW_LOG_ENABLED=true
CACHE_HIT_RATIO_TRACKING=true
MEMORY_USAGE_TRACKING=true
# API Monitoring
API_MONITORING_ENABLED=true
API_RESPONSE_TIME_TRACKING=true
API_ERROR_RATE_TRACKING=true
API_REQUEST_COUNT_TRACKING=true
ENDPOINT_PERFORMANCE_TRACKING=true
# Container Monitoring (if in Docker/Kubernetes)
CONTAINER_MONITORING_ENABLED=true
POD_MONITORING_ENABLED=true
NODE_RESOURCE_MONITORING=true
CLUSTER_HEALTH_MONITORING=true
# Synthetic Monitoring
SYNTHETIC_MONITORING_ENABLED=true
UPTIME_CHECK_URL=https://example.com
UPTIME_CHECK_INTERVAL=300
SYNTHETIC_TRANSACTION_TESTING=true
# Business Intelligence
BUSINESS_INTELLIGENCE_ENABLED=true
USER_BEHAVIOR_TRACKING=true
FEATURE_ADOPTION_TRACKING=true
CONVERSION_TRACKING=true
REVENUE_TRACKING=true
# Compliance and Audit
AUDIT_LOGGING_ENABLED=true
DATA_ACCESS_LOGGING=true
COMPLIANCE_MONITORING_ENABLED=true
GDPR_MONITORING_ENABLED=true
# Log Forwarding
LOG_FORWARDING_ENABLED=true
CLOUD_WATCH_ENABLED=true
CLOUD_WATCH_REGION=us-west-2
CLOUD_WATCH_LOG_GROUP=myapp-logs
CLOUD_WATCH_LOG_STREAM=production
# Metrics Export
METRICS_EXPORT_ENABLED=true
METRICS_EXPORT_FORMAT=prometheus
METRICS_EXPORT_PATH=/var/lib/metrics
METRICS_EXPORT_INTERVAL=60
⚙️ Configuration d'Environnement de Test
🔴 complex
Variables d'environnement pour tests automatisés et CI/CD
# Testing Environment Configuration
# ==================================
# Basic Test Environment
NODE_ENV=test
DEBUG=false
LOG_LEVEL=error
CI=true
# Test Database Configuration
TEST_DB_TYPE=postgresql
TEST_DB_HOST=localhost
TEST_DB_PORT=5432
TEST_DB_NAME=myapp_test
TEST_DB_USER=test_user
TEST_DB_PASSWORD=test_password
TEST_DB_SSL=false
# Test Redis Configuration
TEST_REDIS_HOST=localhost
TEST_REDIS_PORT=6379
TEST_REDIS_DB=2
TEST_REDIS_PASSWORD=
# Test API Configuration
TEST_API_URL=http://localhost:3000
TEST_API_TIMEOUT=5000
TEST_API_RETRY_ATTEMPTS=3
# Test Settings
TEST_TIMEOUT=10000
TEST_PARALLEL=true
TEST_MAX_WORKERS=4
TEST_REPORTERS=spec
TEST_VERBOSE=false
# Coverage Configuration
COVERAGE_ENABLED=true
COVERAGE_THRESHOLD=80
COVERAGE_DIR=./coverage
COVERAGE_REPORTERS=text-lcov,lcov,html
COVERAGE_INCLUDE=src/**/*.js
COVERAGE_EXCLUDE=node_modules/**
# Test Data Management
TEST_SEED_DATA=true
TEST_CLEANUP_AFTER_EACH=true
TEST_ISOLATION=true
TEST_TRANSACTION_ISOLATION=true
# Mocking and Stubbing
MOCK_EXTERNAL_APIS=true
MOCK_EMAILS=true
MOCK_PAYMENTS=true
MOCK_NOTIFICATIONS=true
# Test File Storage
TEST_UPLOAD_DIR=./test-uploads
TEST_STORAGE_TYPE=local
TEST_KEEP_FILES=false
# Test Security
TEST_JWT_SECRET=test-jwt-secret-for-testing
TEST_SESSION_SECRET=test-session-secret-for-testing
TEST_ENCRYPTION_KEY=test-encryption-key-32-chars-long
# CI/CD Configuration
CI_PLATFORM=github_actions
BUILD_NUMBER=123
COMMIT_SHA=abc123def456
BRANCH_NAME=feature/new-feature
PR_NUMBER=456
# GitHub Actions Specific
GITHUB_WORKFLOW=test
GITHUB_ACTION=test
GITHUB_REPOSITORY=owner/repo
GITHUB_REF=refs/heads/main
GITHUB_SHA=abc123def456
GITHUB_ACTOR=test-user
# Jenkins Specific
JENKINS_URL=https://jenkins.example.com
JENKINS_JOB_NAME=myapp-test
JENKINS_BUILD_NUMBER=123
JENKINS_BRANCH=main
# CircleCI Specific
CIRCLECI=true
CIRCLE_BUILD_NUM=123
CIRCLE_BRANCH=main
CIRCLE_SHA1=abc123def456
# Test Reports and Artifacts
TEST_REPORT_FORMAT=junit
TEST_REPORT_PATH=./test-results
ARTIFACTS_DIR=./artifacts
SCREENSHOTS_DIR=./test-screenshots
# Integration Test Configuration
INTEGRATION_TEST_ENABLED=true
INTEGRATION_TEST_TIMEOUT=30000
INTEGRATION_TEST_DB_URL=postgresql://test_user:test_password@localhost:5432/myapp_integration_test
# End-to-End Test Configuration
E2E_TEST_ENABLED=true
E2E_TEST_BASE_URL=http://localhost:3000
E2E_TEST_BROWSER=chrome
E2E_TEST_HEADLESS=true
E2E_TEST_TIMEOUT=60000
# Load Testing Configuration
LOAD_TEST_ENABLED=false
LOAD_TEST_CONCURRENT_USERS=10
LOAD_TEST_DURATION=60
LOAD_TEST_RAMP_UP_TIME=30
# Test Environment Variables for Services
TEST_EMAIL_PROVIDER=mailhog
TEST_EMAIL_HOST=localhost
TEST_EMAIL_PORT=1025
TEST_SMS_PROVIDER=twilio_test
TEST_SMS_ACCOUNT_SID=test_sid
TEST_SMS_AUTH_TOKEN=test_token
TEST_PAYMENT_PROVIDER=stripe_test
TEST_STRIPE_SECRET_KEY=sk_test_stripe_key
# Test Feature Flags
TEST_FEATURE_FLAG_SERVICE=launchdarkly_test
TEST_LAUNCHDARKLY_CLIENT_ID=test_client_id
# Performance Testing
PERFORMANCE_TEST_ENABLED=false
PERFORMANCE_TEST_THRESHOLD=1000
PERFORMANCE_TEST_ITERATIONS=100
# Security Testing
SECURITY_TEST_ENABLED=true
OWASP_ZAP_ENABLED=false
DEPENDENCY_CHECK_ENABLED=true
# Test Data Generation
TEST_DATA_GENERATOR=faker
TEST_LOCALE=en_US
TEST_SEED_RANDOM=false
TEST_SEED_VALUE=12345
# Test Parallelization
TEST_MAX_PARALLEL_SUITES=4
TEST_MAX_PARALLEL_TESTS=10
TEST_SHARD=false
TEST_SHARD_INDEX=0
TEST_SHARD_COUNT=4
# Test Environment Cleanup
TEST_CLEANUP_TIMEOUT=5000
TEST_FORCE_CLEANUP=false
TEST_PRESERVE_FAILED_TESTS=true
# Test Reporting
TEST_COVERAGE_XML_PATH=./coverage/clover.xml
TEST_JUNIT_XML_PATH=./test-results/junit.xml
TEST_HTML_REPORT_PATH=./test-results/index.html
# Notification Settings
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
NOTIFY_ON_FAILURE=true
NOTIFY_ON_SUCCESS=false
# Docker Testing Environment
TEST_Docker_ENABLED=true
TEST_DOCKER_COMPOSE_FILE=docker-compose.test.yml
TEST_DOCKER_NETWORK=test-network
# Kubernetes Testing
TEST_KUBERNETES_ENABLED=false
TEST_KUBERNETES_NAMESPACE=test
TEST_KUBERNETES_CONFIG_PATH=./kubeconfig-test
# Environment-Specific Overrides
TEST_ENVIRONMENT=integration
TEST_OVERRIDES_FILE=./test-overrides.json
# Test Script Configuration
NPM_TEST_COMMAND=npm run test
NPM_TEST_COVERAGE_COMMAND=npm run test:coverage
NPM_TEST_E2E_COMMAND=npm run test:e2e