refactoring prometheus
This commit is contained in:
@@ -18,17 +18,26 @@ services:
|
|||||||
image: pdreker/fritz_exporter:2
|
image: pdreker/fritz_exporter:2
|
||||||
container_name: fritz-exporter
|
container_name: fritz-exporter
|
||||||
restart: always
|
restart: always
|
||||||
|
env_file:
|
||||||
|
- ./.env
|
||||||
environment:
|
environment:
|
||||||
FRITZ_HOSTNAME: '192.168.178.1'
|
FRITZ_HOSTNAME: '${FRITZ_HOSTNAME}'
|
||||||
FRITZ_USERNAME: 'fritz9297'
|
FRITZ_USERNAME: '${FRITZ_USERNAME}'
|
||||||
FRITZ_PASSWORD: 'VeNuocNuocVe26!'
|
FRITZ_PASSWORD: '${FRITZ_PASSWORD}'
|
||||||
ports:
|
ports:
|
||||||
- "9787:9787"
|
- "9787:9787"
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.2'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 64M
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus:latest
|
image: prom/prometheus:v2.54.0
|
||||||
volumes:
|
volumes:
|
||||||
- ./prometheus/:/etc/prometheus/
|
- ./prometheus/:/etc/prometheus/
|
||||||
- prometheus_data:/prometheus
|
- prometheus_data:/prometheus
|
||||||
@@ -44,13 +53,26 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
restart: always
|
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:
|
# deploy:
|
||||||
# placement:
|
# placement:
|
||||||
# constraints:
|
# constraints:
|
||||||
# - node.hostname == ${HOSTNAME}
|
# - node.hostname == ${HOSTNAME}
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana
|
image: grafana/grafana:11.0.0
|
||||||
user: "472"
|
user: "472"
|
||||||
depends_on:
|
depends_on:
|
||||||
- prometheus
|
- prometheus
|
||||||
@@ -68,6 +90,19 @@ services:
|
|||||||
- front-tier
|
- front-tier
|
||||||
- proxy_tier
|
- proxy_tier
|
||||||
restart: always
|
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:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
# HTTP to HTTPS Redirect
|
# HTTP to HTTPS Redirect
|
||||||
|
|||||||
Reference in New Issue
Block a user