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: baikal:
container_name: baikal container_name: baikal
image: ckulka/baikal:nginx image: ckulka/baikal:nginx
restart: on-failure restart: unless-stopped
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
volumes: volumes:

View File

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

View File

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

View File

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

View File

@ -61,6 +61,8 @@ services:
- GF_AUTH_GENERIC_OAUTH_GROUPS_PATH=groups - GF_AUTH_GENERIC_OAUTH_GROUPS_PATH=groups
- GF_AUTH_GENERIC_OAUTH_ALLOWED_GROUPS=admin - GF_AUTH_GENERIC_OAUTH_ALLOWED_GROUPS=admin
- GF_AUTH_OAUTH_ALLOW_INSECURE_EMAIL_LOOKUP=true - 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: volumes:
- $DATA/monitoring/grafana:/var/lib/grafana - $DATA/monitoring/grafana:/var/lib/grafana
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
@ -131,7 +133,49 @@ services:
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
networks: networks:
- monitoring - 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: networks:
monitoring: monitoring:

View File

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

View File

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