first commit
This commit is contained in:
74
docker-compose.yml
Normal file
74
docker-compose.yml
Normal file
@@ -0,0 +1,74 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Python Flask API for Grafana data source
|
||||
monitoring-api:
|
||||
build: .
|
||||
container_name: monitoring-api
|
||||
ports:
|
||||
- "5000:5000"
|
||||
environment:
|
||||
- API_BASE_URL=https://api-personalizeit.zapplataforma.chat
|
||||
- API_USERNAME=${API_USERNAME}
|
||||
- API_PASSWORD=${API_PASSWORD}
|
||||
- FLASK_PORT=5000
|
||||
- FLASK_HOST=0.0.0.0
|
||||
- DEBUG=False
|
||||
- REFRESH_INTERVAL=5
|
||||
- QUEUE_IDS=-1,1,2,3,4,5,7
|
||||
volumes:
|
||||
- ./.env:/app/.env:ro
|
||||
networks:
|
||||
- monitoring
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
# Grafana for visualization
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
- GF_SECURITY_ADMIN_USER=admin
|
||||
- GF_USERS_ALLOW_SIGN_UP=false
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning:/etc/grafana/provisioning:ro
|
||||
networks:
|
||||
- monitoring
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- monitoring-api
|
||||
|
||||
# Prometheus for scraping metrics (optional)
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- prometheus-storage:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
networks:
|
||||
- monitoring
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- monitoring-api
|
||||
|
||||
volumes:
|
||||
grafana-storage:
|
||||
prometheus-storage:
|
||||
|
||||
networks:
|
||||
monitoring:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user