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.
This commit is contained in:
2025-09-16 17:49:42 +03:00
parent 8673cb4f55
commit 30830c5bd9
26 changed files with 43 additions and 4668 deletions

View File

@@ -17,22 +17,6 @@ def test_pytest_config_loaded():
assert os.path.exists('tests/infra'), "Директория tests/infra должна существовать"
assert os.path.exists('tests/bot'), "Директория tests/bot должна существовать"
def test_import_paths():
"""Проверяем, что пути импорта настроены правильно"""
# Проверяем, что можем импортировать модули мониторинга
sys.path.insert(0, 'infra/monitoring')
try:
import metrics_collector
import message_sender
import prometheus_server
import server_monitor
assert True
except ImportError as e:
pytest.fail(f"Failed to import monitoring modules: {e}")
finally:
# Убираем добавленный путь
if 'infra/monitoring' in sys.path:
sys.path.remove('infra/monitoring')
def test_test_structure():
"""Проверяем структуру тестов"""
@@ -41,8 +25,6 @@ def test_test_structure():
assert os.path.exists('tests/infra/__init__.py'), "tests/infra/__init__.py должен существовать"
assert os.path.exists('tests/bot/__init__.py'), "tests/bot/__init__.py должен существовать"
# Проверяем наличие тестов инфраструктуры
assert os.path.exists('tests/infra/test_infra.py'), "tests/infra/test_infra.py должен существовать"
if __name__ == "__main__":
pytest.main([__file__, "-v"])