Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
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
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
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