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.
This commit is contained in:
2026-01-23 21:38:48 +03:00
parent 75cd722cc4
commit 9e03c1f6f2
3 changed files with 56 additions and 6 deletions

View File

@@ -34,7 +34,7 @@
known_hosts:
path: ~/.ssh/known_hosts
name: "{{ ansible_host }}"
key: "{{ lookup('pipe', 'ssh-keyscan -t rsa,ecdsa,ed25519 ' + ansible_host) }}"
key: "{{ lookup('pipe', 'ssh-keyscan -t rsa,ecdsa,ed25519 ' + ansible_host + ' 2>/dev/null') }}"
state: present
delegate_to: localhost
run_once: true
@@ -71,6 +71,8 @@
- certbot
- python3-certbot-nginx
- logrotate
- net-tools
- cron
state: present
- name: "[1/10] Установить Python библиотеки для Ansible"
@@ -233,9 +235,10 @@
var: node_exporter_status.stdout_lines
- name: "[3/10] Проверить, что node_exporter слушает на порту 9100"
command: netstat -tulpn | grep 9100
command: ss -tulpn | grep 9100
register: node_exporter_port
changed_when: false
ignore_errors: yes
- name: "[3/10] Показать информацию о порте 9100"
debug:
@@ -1126,6 +1129,7 @@
command: fail2ban-client status
register: fail2ban_status
changed_when: false
ignore_errors: yes
- name: "[9/10] Показать статус Fail2ban"
debug:
@@ -1233,6 +1237,12 @@
enabled: yes
state: started
- name: "[9.5/10] Установить cron (если не установлен)"
apt:
name: cron
state: present
when: ansible_pkg_mgr == "apt"
- name: "[9.5/10] Настроить cron для ежедневного запуска logrotate"
cron:
name: "Logrotate daily"