114 lines
2.7 KiB
YAML
Executable File
114 lines
2.7 KiB
YAML
Executable File
|
|
|
|
volumes:
|
|
prometheus_data: {}
|
|
grafana_data: {}
|
|
influxdb_data: {}
|
|
|
|
networks:
|
|
front-tier:
|
|
back-tier:
|
|
proxy_tier:
|
|
name: proxy_tier
|
|
external: true
|
|
|
|
services:
|
|
|
|
fritz-exporter:
|
|
image: pdreker/fritz_exporter:2
|
|
container_name: fritz-exporter
|
|
restart: always
|
|
env_file:
|
|
- ./.env
|
|
environment:
|
|
FRITZ_HOSTNAME: '${FRITZ_HOSTNAME}'
|
|
FRITZ_USERNAME: '${FRITZ_USERNAME}'
|
|
FRITZ_PASSWORD: '${FRITZ_PASSWORD}'
|
|
ports:
|
|
- "9787:9787"
|
|
networks:
|
|
- back-tier
|
|
resources:
|
|
limits:
|
|
cpus: '0.2'
|
|
memory: 128M
|
|
reservations:
|
|
cpus: '0.1'
|
|
memory: 64M
|
|
|
|
prometheus:
|
|
image: prom/prometheus:v2.54.0
|
|
volumes:
|
|
- ./prometheus/:/etc/prometheus/
|
|
- prometheus_data:/prometheus
|
|
- ./web.yml:/etc/config/web.yml
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
|
- '--web.console.templates=/usr/share/prometheus/consoles'
|
|
# - '--web.config.file=/etc/config/web.yml'
|
|
ports:
|
|
- 9090:9090
|
|
networks:
|
|
- back-tier
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9090/-/healthy"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
resources:
|
|
limits:
|
|
cpus: '1'
|
|
memory: 1G
|
|
reservations:
|
|
cpus: '0.5'
|
|
memory: 512M
|
|
# deploy:
|
|
# placement:
|
|
# constraints:
|
|
# - node.hostname == ${HOSTNAME}
|
|
|
|
grafana:
|
|
image: grafana/grafana:11.0.0
|
|
user: "472"
|
|
depends_on:
|
|
- prometheus
|
|
ports:
|
|
- 3300:3000
|
|
expose:
|
|
- "3000"
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
|
env_file:
|
|
- ./grafana/config.monitoring
|
|
networks:
|
|
- back-tier
|
|
- front-tier
|
|
- proxy_tier
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
resources:
|
|
limits:
|
|
cpus: '1'
|
|
memory: 512M
|
|
reservations:
|
|
cpus: '0.5'
|
|
memory: 256M
|
|
labels:
|
|
- "traefik.enable=true"
|
|
# HTTP to HTTPS Redirect
|
|
- "traefik.http.routers.grafana.entrypoints=websecure"
|
|
- "traefik.http.routers.grafana.rule=Host(`grafana.quangkhai.ch`)"
|
|
- "traefik.http.routers.grafana.tls.certresolver=myresolver"
|
|
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
|
- "traefik.docker.network=proxy_tier"
|