feat: enhance Ansible playbook and Nginx configuration with authentication and logrotate setup

- Added environment variables for project configuration in env.template.
- Updated Ansible playbook to use environment variables for project settings and added tasks for monitoring authentication setup.
- Enhanced Nginx configuration for Alertmanager and Prometheus with HTTP Basic Authentication.
- Introduced logrotate configuration for managing log files and set up cron for daily execution.
- Removed obsolete Uptime Kuma docker-compose file.
This commit is contained in:
2025-09-19 12:09:05 +03:00
parent 1eb11e454d
commit f7b08ae9e8
16 changed files with 959 additions and 51 deletions

View File

@@ -0,0 +1,77 @@
# Uptime Kuma Configuration
Uptime Kuma - это статусная страница для мониторинга доступности сервисов.
## Доступ
- **Веб-интерфейс**: `https://your-domain/status/`
- **Прямой доступ**: `http://localhost:3001` (только локально)
## Настройка
### Первоначальная настройка
1. Запустите сервисы:
```bash
make up
```
2. Откройте `https://your-domain/status/`
3. Создайте администратора:
- Username: `admin`
- Password: `admin` (смените после первого входа)
### Мониторинг сервисов
Uptime Kuma автоматически настроит мониторинг следующих сервисов:
- **Telegram Bot**: `http://telegram-bot:8080/health`
- **AnonBot**: `http://anon-bot:8081/health`
- **Prometheus**: `http://prometheus:9090/-/healthy`
- **Grafana**: `http://grafana:3000/api/health`
- **AlertManager**: `http://alertmanager:9093/-/healthy`
- **Nginx**: `http://nginx:80/nginx-health`
### Уведомления
Настройте уведомления в веб-интерфейсе:
- Telegram Bot
- Email
- Webhook
- Discord
- Slack
## Файлы конфигурации
- `monitors.json` - экспорт настроенных мониторов
- `settings.json` - настройки приложения
- `backup/` - резервные копии конфигурации
## Команды управления
```bash
# Показать логи
make logs-uptime-kuma
# Перезапустить
make restart-uptime-kuma
# Проверить статус
make status
```
## Резервное копирование
Конфигурация сохраняется в Docker volume `uptime_kuma_data`.
Для резервного копирования:
```bash
# Создать backup
make backup
# Восстановить
make restore FILE=backup.tar.gz
```