BUH_bot/.env.prod.example
Игорь Надеин 4800e8c375 feat: Add production Docker orchestration with monitoring
Production Stack (7 services):
- buh_bot: Main bot from registry (1 CPU, 1GB RAM)
- nginx: Reverse proxy with rate limiting (10 req/s)
- prometheus: Metrics collection (30d retention)
- grafana: Monitoring dashboards (port 3000)
- node_exporter: Host metrics (port 9100)
- cadvisor: Container metrics (port 8080)
- watchtower: Auto-updates (hourly check)

Configuration:
- docker-compose.prod.yml with 7-service stack
- nginx.conf with SSL-ready config and healthchecks
- prometheus.yml with scrape configs
- grafana datasource and dashboard provisioning
- .env.prod.example template
- Custom network 172.20.0.0/16
- Persistent volumes in /var/lib/buh_bot
- Log rotation: 50MB x 5 files
2025-11-03 14:20:48 +03:00

46 lines
1.1 KiB
Plaintext

# Production Environment Variables
# ===== Основные настройки =====
# Telegram Bot Token (обязательно!)
TELEGRAM_BOT_TOKEN=your_production_bot_token_here
# МойСклад API
MOYSKLAD_API_URL=https://api.moysklad.ru/api/remap/1.2
# Timezone
TZ=Europe/Moscow
# Уровень логирования (DEBUG, INFO, WARNING, ERROR)
LOG_LEVEL=INFO
# ===== Docker Registry =====
# Для использования собственного registry
DOCKER_REGISTRY=ghcr.io
DOCKER_USERNAME=your_github_username
BOT_VERSION=latest
# ===== Nginx =====
NGINX_HTTP_PORT=80
NGINX_HTTPS_PORT=443
# ===== Мониторинг =====
# Prometheus
PROMETHEUS_PORT=9090
# Grafana
GRAFANA_PORT=3000
GRAFANA_USER=admin
GRAFANA_PASSWORD=change_me_in_production
# ===== Watchtower (auto-update) =====
# Уведомления (опционально)
# Примеры:
# Telegram: telegram://token@telegram?channels=channel_id
# Email: smtp://username:password@host:port/?from=sender@example.com&to=receiver@example.com
WATCHTOWER_NOTIFICATION_URL=
# ===== Backup =====
BACKUP_ENABLED=true
BACKUP_SCHEDULE=0 2 * * *
BACKUP_RETENTION_DAYS=30