- Removed unnecessary `__init__.py` and `Dockerfile` to streamline project organization. - Updated `.dockerignore` and `.gitignore` to improve exclusion patterns for build artifacts and environment files. - Enhanced `Makefile` with new commands for managing Docker containers and added help documentation. - Introduced `pyproject.toml` for better project metadata management and dependency tracking. - Updated `requirements.txt` to reflect changes in dependencies for metrics and monitoring. - Refactored various handler files to improve code organization and maintainability.
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
services:
|
|
telegram-bot:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.bot
|
|
container_name: telegram-bot
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8000:8000" # Экспозиция порта для метрик
|
|
environment:
|
|
- PYTHONPATH=/app
|
|
volumes:
|
|
- ./database:/app/database
|
|
- ./logs:/app/logs
|
|
- ./settings.ini:/app/settings.ini
|
|
networks:
|
|
- monitoring
|
|
depends_on:
|
|
- prometheus
|
|
- grafana
|
|
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: prometheus
|
|
ports:
|
|
- "9090:9090"
|
|
volumes:
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
|
- prometheus_data:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
|
- '--web.console.templates=/etc/prometheus/consoles'
|
|
- '--storage.tsdb.retention.time=200h'
|
|
- '--web.enable-lifecycle'
|
|
restart: unless-stopped
|
|
networks:
|
|
- monitoring
|
|
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: grafana
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=admin
|
|
- GF_SECURITY_ADMIN_PASSWORD=admin
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
- ./grafana/dashboards:/etc/grafana/provisioning/dashboards
|
|
- ./grafana/datasources:/etc/grafana/provisioning/datasources
|
|
restart: unless-stopped
|
|
networks:
|
|
- monitoring
|
|
depends_on:
|
|
- prometheus
|
|
|
|
volumes:
|
|
prometheus_data:
|
|
grafana_data:
|
|
|
|
networks:
|
|
monitoring:
|
|
driver: bridge
|