Commit Graph

50 Commits

Author SHA1 Message Date
07982ee0f2 some fix 3 2026-01-25 19:24:55 +03:00
6c51a82dce some fix 2 2026-01-25 19:14:07 +03:00
5e57e5214c some fix CI 2026-01-25 19:08:24 +03:00
8e595bf7f2 chore: remove outdated monitoring documentation files
- Deleted FIX_PROMLEMS.md and MONITORING_AUTH.md as they contained obsolete information regarding Prometheus and Alertmanager configurations.
- This cleanup helps streamline the documentation and focuses on current setup practices.
2026-01-25 19:02:46 +03:00
34b0345983 some fix 2026-01-25 18:50:18 +03:00
1dceab6479 chore: Обновление Docker Compose и CI/CD пайплайна
- Docker Compose теперь использует GitHub Secrets для токенов ботов (приоритет над .env)
- Добавлена функция ручного отката с указанием коммита
- Реализованы проверки работоспособности с экспоненциальной задержкой
- Улучшены уведомления об откате
2026-01-25 18:33:58 +03:00
0cdc40cd21 chore: enhance deployment workflow with improved health checks and manual trigger
- Updated the deployment job to allow manual triggering via workflow_dispatch.
- Implemented a retry mechanism for health checks on Prometheus and Grafana to improve reliability.
- Increased wait time for services to start before health checks are performed.
- Modified health check messages for better clarity and added logging for failed checks.
2026-01-25 16:58:16 +03:00
fde1f14708 chore: update CI/CD pipeline configuration for improved branch handling
- Renamed the CI/CD pipeline for clarity and consistency.
- Updated the branch triggers to include 'dev-*' for better integration of development branches.
- Removed the URL setting for the production environment to streamline the deployment process.
2026-01-25 15:52:02 +03:00
5a0c2d6942 chore: remove CI and deployment workflows to streamline processes
- Deleted outdated CI workflow file to simplify the continuous integration process.
- Removed deployment workflow file to eliminate redundancy and focus on a more efficient deployment strategy.
2026-01-25 15:46:58 +03:00
153a7d4807 chore: refine CI and deployment workflows with enhanced notifications and checks
- Improved CI workflow notifications for better clarity on test results.
- Added a status check job in the deployment workflow to ensure only successful builds are deployed.
- Updated deployment notification messages for improved context and clarity.
2026-01-25 15:44:21 +03:00
0944175807 chore: enhance CI and deployment workflows with status checks and notifications
- Updated CI workflow to provide clearer notifications on test results and deployment readiness.
- Added a new job in the deployment workflow to check the status of the last CI run before proceeding with deployment, ensuring that only successful builds are deployed.
2026-01-25 15:39:19 +03:00
3ee72ec48a chore: update CI and deployment workflows for improved notifications and permissions
- Upgraded the upload-artifact action from v3 to v4 in CI workflow for better performance.
- Added a notification step in the CI workflow to send test results via Telegram, including job status and repository details.
- Modified the deployment workflow to ensure correct file permissions before and after code updates.
- Renamed the deployment notification step for clarity and included a link to the action run details in the message.
2026-01-25 15:35:56 +03:00
dd8b1c02a4 chore: update Python version in Dockerfile and improve test commands in Makefile
- Upgraded Python version in Dockerfile from 3.9 to 3.11.9 for enhanced performance and security.
- Adjusted paths in Dockerfile to reflect the new Python version.
- Modified test commands in Makefile to activate the virtual environment before running tests, ensuring proper dependency management.
2026-01-25 15:27:57 +03:00
9e03c1f6f2 chore: optimize resource allocation and memory settings in Docker Compose
- Added memory and CPU limits and reservations for Prometheus, Grafana, and Uptime Kuma services to enhance performance and resource management.
- Updated Prometheus and Grafana configurations with new storage block duration settings for improved memory optimization.
- Revised README to include additional commands for running specific services and restarting containers.
2026-01-23 21:38:48 +03:00
75cd722cc4 fix: update htpasswd generation for monitoring and status page
- Modified the htpasswd command to limit the password length to 72 characters for security compliance.
- Added a new task to generate an htpasswd hash specifically for the status page.
- Updated the task that creates the htpasswd file to use the output from the new hash generation.
2026-01-22 22:38:01 +03:00
95fabdc0d1 refactor: consolidate Nginx configurations into a single file
- Merged individual Nginx configuration files for Grafana, Prometheus, and Alertmanager into a unified nginx.conf.
- Added location blocks for Grafana, Prometheus, and Alertmanager with appropriate proxy settings, authentication, and rate limiting.
- Removed obsolete configuration files to streamline the Nginx setup and improve maintainability.
2025-09-20 01:14:10 +03:00
8be219778c chore: update configuration files for improved logging and service management
- Enhanced .dockerignore to exclude bot logs, Docker volumes, and temporary files.
- Updated .gitignore to include Ansible vars files for better environment management.
- Modified docker-compose.yml health checks to use curl for service verification.
- Refined Ansible playbook by adding tasks for creating default Zsh configuration files and cleaning up temporary files.
- Improved Nginx configuration to support Uptime Kuma with specific location blocks for status and dashboard, including rate limiting and WebSocket support.
2025-09-19 16:40:40 +03:00
a075ef6772 chore: remove specific version reference for telegram-helper-bot in Ansible playbook
- Eliminated the hardcoded version 'dev-9' for the telegram-helper-bot repository in the Ansible playbook to allow for more flexible updates.
2025-09-19 13:03:25 +03:00
8595fc5886 refactor: streamline Ansible playbook and logrotate configurations
- Removed environment variable lookups for logrotate settings in logrotate configuration files, replacing them with hardcoded values.
- Updated the Ansible playbook to simplify project root, deploy user, and old server configurations by removing environment variable dependencies.
- Added tasks to copy Zsh configuration files from an old server to the new server, ensuring proper permissions and cleanup of temporary files.
- Enhanced logrotate configurations for bots and system logs to ensure consistent management of log files.
2025-09-19 13:00:19 +03:00
f7b08ae9e8 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.
2025-09-19 12:09:05 +03:00
1eb11e454d chore: remove Nginx service from docker-compose and update Ansible inventory with new server IP
- Deleted the Nginx service configuration from docker-compose.yml.
- Updated the Ansible inventory file to reflect a new server IP address.
2025-09-19 02:21:57 +03:00
14b19699c5 feat: enhance Ansible playbook with project directory permissions and service checks
- Add tasks to set directory permissions for the project before and after cloning.
- Introduce a task to reload the SSH service to apply new configurations.
- Implement a check for Node Exporter metrics availability.
- Update Prometheus configuration comment for clarity on Node Exporter target.
2025-09-19 01:56:12 +03:00
1db579797d refactor: update Nginx configuration and Docker setup
- Change user directive in Nginx configuration from 'nginx' to 'www-data'.
- Update upstream server configurations in Nginx to use 'localhost' instead of service names.
- Modify Nginx server block to redirect HTTP to a status page instead of Grafana.
- Rename Alertmanager location from '/alertmanager/' to '/alerts/' for consistency.
- Remove deprecated status page configuration and related files.
- Adjust Prometheus configuration to reflect the new Docker network settings.
2025-09-18 21:21:23 +03:00
9ec3f02767 feat: integrate Uptime Kuma and Alertmanager into Docker setup
- Add Uptime Kuma service for status monitoring with health checks.
- Introduce Alertmanager service for alert management and notifications.
- Update docker-compose.yml to include new services and their configurations.
- Enhance Makefile with commands for managing Uptime Kuma and Alertmanager logs.
- Modify Ansible playbook to install necessary packages and configure SSL for new services.
- Update Nginx configuration to route traffic to Uptime Kuma and Alertmanager.
- Adjust Prometheus configuration to include alert rules and external URLs.
2025-09-16 21:50:56 +03:00
5e10204137 Merge branch 'main' of https://github.com/KerradKerridi/prod 2025-09-16 18:52:53 +03:00
5b8833a67f Merge branch 'main' of https://github.com/KerradKerridi/prod 2025-09-16 18:52:24 +03:00
2661b3865e fix: update Dockerfile reference in docker-compose and add versioning to Ansible playbook
- Change Dockerfile reference in docker-compose.yml from Dockerfile.bot to Dockerfile
- Add versioning comment for the telegram-helper-bot repository in playbook.yml
2025-09-16 18:51:05 +03:00
ANDREY KATYKHIN
539c074e9f Merge pull request #3 from KerradKerridi/dev-3
Dev 3
2025-09-16 18:32:23 +03:00
f8d6b92fd2 feat: add Nginx reverse proxy and SSL configuration
- Introduce Nginx service in docker-compose for handling HTTP/HTTPS traffic.
- Configure Nginx with SSL support and health checks for Grafana and Prometheus.
- Update env.template to include SERVER_IP and STATUS_PAGE_PASSWORD variables.
- Enhance Ansible playbook with tasks for Nginx installation, SSL certificate generation, and configuration management.
2025-09-16 18:31:51 +03:00
30830c5bd9 refactor: update Docker setup and remove deprecated monitoring components
- Replace curl with wget in healthcheck commands for better reliability.
- Remove server_monitor service and related configurations from docker-compose.
- Update Dockerfile to use a multi-stage build for optimized image size.
- Delete obsolete Dockerfile.optimized and related monitoring scripts.
- Clean up Makefile by removing commands related to the server_monitor service.
- Update README to reflect changes in monitoring services and commands.
2025-09-16 17:49:42 +03:00
8673cb4f55 feat: enhance Ansible playbook with security and timezone configurations
- Add fail2ban installation and configuration for SSH, Nginx, and Docker
- Implement kernel security parameter adjustments to mitigate DDoS and spoofing attacks
- Set timezone to Europe/Moscow
- Update SSH configuration to use port 15722 and close the default port 22
- Enhance UFW rules to allow new SSH port and restrict access to essential services
- Include checks for fail2ban status and debug output for verification
2025-09-16 16:41:54 +03:00
a1586e78b3 feat: enhance Ansible playbook with swap file management
- Update inventory to use root user with SSH options for security
- Add tasks for creating, configuring, and enabling a swap file
- Set swappiness parameter temporarily and permanently
- Ensure swap file is added to /etc/fstab for automatic mounting
- Include checks and debug information for swap status
2025-09-16 15:29:40 +03:00
0d5dc67eb9 feat: add Node Exporter Full dashboard and auto-installation
- Add Node Exporter Full dashboard (ID: 1860) from Grafana.com
- Configure automatic dashboard installation in playbook.yml
- Add prometheus-node-exporter service installation and configuration
- Add port 9100 to UFW firewall rules
- Add dashboard verification tasks in playbook
- Configure Grafana variables for admin credentials
2025-09-16 12:19:48 +03:00
4eb21a7dbc Add node_exporter configuration to prometheus.yml 2025-09-16 12:09:34 +03:00
81a4069623 Refactor Ansible playbook for improved server setup and monitoring
- Update SSH user configuration for enhanced security
- Add tasks for UFW setup and Docker service management
- Optimize data migration processes for bots
- Implement checks for database permissions and sizes
- Clean up temporary files post-migration
2025-09-16 00:43:45 +03:00
136469793c Update Ansible playbook for server migration and configuration
- Change SSH user to root for initial setup
- Add tasks for updating SSH host keys and configuring UFW
- Implement Docker Compose installation and service management
- Enhance data migration process for telegram-helper-bot and AnonBot
- Include checks for database sizes and permissions adjustments for voice_users
- Clean up temporary files after migration
2025-09-11 00:09:19 +03:00
bb91e139bc Update Ansible configuration and enhance playbook
- Add UFW configuration to secure server ports
- Install additional packages including vim, zsh, and monitoring tools
- Change default shell for 'deploy' user to zsh
- Update .gitignore to include Ansible inventory files
2025-09-09 23:00:15 +03:00
4981ae8877 Add Ansible playbook for bot migration to new server
- Add inventory.ini with server configuration
- Add playbook.yml with complete migration process
- Configure user 'deploy' with UID/GID 1001:1001
- Add SSH key setup for GitHub access
- Add Docker group membership for deploy user
- Include data migration from old server
- Add port validation for all services
2025-09-09 22:22:31 +03:00
b34da5015d Implement AnonBot integration and monitoring enhancements
- Added AnonBot service to docker-compose with resource limits and environment variables.
- Updated Makefile to include commands for AnonBot logs, restart, and dependency checks.
- Enhanced Grafana dashboards with AnonBot health metrics and database connection statistics.
- Implemented AnonBot status retrieval in the message sender for improved monitoring.
- Updated Prometheus configuration to scrape metrics from AnonBot service.
2025-09-08 23:17:24 +03:00
40968dd075 WIP: Development changes moved from master
- Modified Grafana dashboards
- Updated message sender and metrics collector
- Added new rate limiting dashboard
- Removed count_tests.py
2025-09-05 01:29:28 +03:00
7d08575512 Update Prometheus configuration to use container name for telegram-helper-bot target 2025-09-04 09:00:22 +03:00
d72b870173 Обновить конфигурацию Prometheus для использования имен контейнеров Docker
- Изменить host.docker.internal на bots_server_monitor:9091 для infrastructure job
- Изменить host.docker.internal на bots_telegram_bot:8080 для telegram-helper-bot job
- Обновить комментарии для соответствия новой конфигурации
2025-09-04 08:59:11 +03:00
ANDREY KATYKHIN
f7d11abf69 Merge pull request #1 from KerradKerridi/dev-1
Dev 1
2025-09-04 01:02:24 +03:00
567e5b3aa3 Enhance monitoring configuration by adding status update interval and alert delays for CPU, RAM, and disk metrics. Update Makefile to include dependency checks for testing, and modify requirements to include requests library. Refactor message sender and metrics collector for improved logging and alert handling. 2025-09-04 00:45:06 +03:00
18d6f3d441 Update docker-compose to include voice_users volume, modify Grafana dashboard expressions for active and total users, and adjust message sender status check interval to every 4 hours. 2025-09-03 22:08:07 +03:00
ec62183e2a Refactor Grafana dashboard metrics to improve clarity and accuracy. Updated expressions for command and error rates to reflect per minute calculations, adjusted titles accordingly, and modified color schemes for better visibility. Removed obsolete metrics and streamlined the dashboard layout. 2025-09-03 19:17:46 +03:00
ea0ec8ab4f Update .gitignore to include bots directory and remove subprojects 2025-09-03 12:00:48 +03:00
566f35ed0f Перенос изменений из master в dev-1 ветку 2025-09-03 00:34:41 +03:00
6733043a61 Update docker-compose and README for Telegram bot integration; add environment file reference and clarify port usage in documentation. 2025-08-31 23:32:56 +03:00
7378179d98 Initial commit: Add infrastructure and bot project 2025-08-31 17:55:55 +03:00