Restart policy, grafana weekly report & depends_on

This commit is contained in:
Brieuc Dubois 2023-10-28 13:19:34 +02:00
parent 50fed93655
commit 8d996db8e3
7 changed files with 63 additions and 8 deletions

View File

@ -2,7 +2,7 @@ services:
baikal:
container_name: baikal
image: ckulka/baikal:nginx
restart: on-failure
restart: unless-stopped
environment:
- TZ=Europe/Paris
volumes:

View File

@ -2,6 +2,7 @@ services:
invoiceplane:
container_name: invoiceplane
image: mhzawadi/invoiceplane:latest
restart: unless-stopped
volumes:
- $DATA/invoiceplane/uploads:/var/www/html/uploads
- $DATA/invoiceplane/ipconfig.php:/var/www/html/ipconfig.php

View File

@ -2,7 +2,7 @@ services:
registry-ui:
container_name: registry-ui
image: joxit/docker-registry-ui:main
restart: always
restart: on-failure:5
labels:
- "traefik.enable=true"
- "traefik.http.routers.registryui.rule=Host(`registry.bhasher.com`)"
@ -26,10 +26,12 @@ services:
networks:
- registry
- external
depends_on:
- registry
registry:
image: registry:2.8.2
restart: always
restart: on-failure:5
container_name: registry
ports:
- 5000:5000

View File

@ -8,7 +8,7 @@ services:
networks:
- smarthome
- external
restart: on-failure
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.hass.rule=Host(`hass.bhasher.com`)"
@ -16,6 +16,9 @@ services:
- "traefik.http.services.hass.loadbalancer.server.port=8123"
- "traefik.http.routers.hass.tls=true"
- "traefik.http.routers.hass.tls.certresolver=http"
depends_on:
- authelia
- traefik
mosquitto:
container_name: mosquitto
@ -31,7 +34,7 @@ services:
networks:
- smarthome
- external
restart: on-failure
restart: unless-stopped
zigbee2mqtt:
container_name: zigbee2mqtt
@ -45,10 +48,12 @@ services:
- /dev/ttyACM0:/dev/ttyACM0
networks:
- smarthome
depends_on:
- mosquitto
nodered:
container_name: nodered
restart: on-failure
restart: on-failure:5
image: nodered/node-red:latest
volumes:
- $DATA/nodered:/data
@ -64,6 +69,8 @@ services:
- "traefik.http.routers.nodered.tls=true"
- "traefik.http.routers.nodered.tls.certresolver=http"
- "traefik.http.routers.nodered.middlewares=authelia@docker"
depends_on:
- hass
networks:

View File

@ -61,6 +61,8 @@ services:
- GF_AUTH_GENERIC_OAUTH_GROUPS_PATH=groups
- GF_AUTH_GENERIC_OAUTH_ALLOWED_GROUPS=admin
- GF_AUTH_OAUTH_ALLOW_INSECURE_EMAIL_LOOKUP=true
- GF_RENDERING_SERVER_URL=http://grafana-renderer:8081/render
- GF_RENDERING_CALLBACK_URL=http://grafana:3000/
volumes:
- $DATA/monitoring/grafana:/var/lib/grafana
- /etc/localtime:/etc/localtime:ro
@ -131,7 +133,49 @@ services:
- /etc/localtime:/etc/localtime:ro
networks:
- monitoring
depends_on:
- prometheus
grafana-renderer:
container_name: grafana-renderer
image: grafana/grafana-image-renderer:latest
restart: unless-stopped
networks:
- monitoring
depends_on:
- grafana
grafana-reporter:
container_name: grafana-reporter
image: izakmarais/grafana-reporter:latest
restart: unless-stopped
command: "-ip grafana:3000 -cmd_enable=0 -grid-layout=1"
networks:
- monitoring
- external
depends_on:
- grafana
- grafana-renderer
grafana-sendreport:
container_name: grafana-sendreport
image: registry.bhasher.com/send-report:latest
restart: unless-stopped
environment:
- PDF_URL=grafana-reporter:8686/api/v5/report/64nrElFmj?apitoken=${GRAFANA_TOKEN}&var-interval=5m&from=now-7d&to=now
- TO_EMAIL=grafana-report.lan@bhasher.com
- SMTP_SERVER=bdubois.io
- SMTP_PORT=465
- SMTP_USER=${SMTP_USER}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- CRON_SCHEDULE=0 4 * * 0
networks:
- monitoring
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on:
- grafana-reporter
networks:
monitoring:

View File

@ -21,7 +21,7 @@ services:
mariadb:
container_name: mariadb
image: mariadb:latest
restart: on-failure
restart: unless-stopped
environment:
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT}
volumes:

View File

@ -2,6 +2,7 @@ services:
watchtower:
container_name: watchtower
image: containrrr/watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro