docker: add healtchecks (#709)
Reviewed-on: #709 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
parent
5f58b33a33
commit
db9284fe1c
4 changed files with 56 additions and 20 deletions
|
@ -20,6 +20,11 @@ services:
|
|||
SMTP_GENERIC_MAP: "/.*/ info@mgrote.net"
|
||||
networks:
|
||||
- mail-relay
|
||||
healthcheck:
|
||||
test: ["CMD", "sh", "-c", "echo 'EHLO localhost' | nc -w 1 localhost 25 | grep -q '220 '"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
######## Networks ########
|
||||
networks:
|
||||
|
|
|
@ -21,6 +21,8 @@ services:
|
|||
networks:
|
||||
- intern
|
||||
- traefik
|
||||
healthcheck:
|
||||
test: ["CMD", "/usr/bin/miniflux", "-healthcheck", "auto"]
|
||||
labels:
|
||||
traefik.http.routers.miniflux.rule: Host(`miniflux.mgrote.net`)
|
||||
traefik.enable: true
|
||||
|
@ -46,6 +48,10 @@ services:
|
|||
- db16:/var/lib/postgresql/data
|
||||
networks:
|
||||
- intern
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "miniflux"]
|
||||
interval: 10s
|
||||
start_period: 30s
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
|
||||
|
|
|
@ -13,6 +13,11 @@ services:
|
|||
depends_on:
|
||||
- oci-registry-ui
|
||||
- oci-registry-redis
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5000/v2/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
environment:
|
||||
TZ: Europe/Berlin
|
||||
REGISTRY_AUTH: none
|
||||
|
@ -61,6 +66,11 @@ services:
|
|||
MAXMEMORY POLICY: allkeys-lru
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
oci-registry-ui:
|
||||
restart: always
|
||||
|
@ -77,6 +87,11 @@ services:
|
|||
networks:
|
||||
- traefik
|
||||
- intern
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
labels:
|
||||
traefik.http.routers.registry-ui.rule: Host(`registry.mgrote.net`)&&PathPrefix(`/ui`) # mache unter /ui erreichbar, damit wird demPfad dieser Prefix hinzugefügt, die Anwendung "hört" dort abrer nicht
|
||||
traefik.http.routers.registry-ui.middlewares: registry-ui-strip-prefix,registry-ui-ipwhitelist # also entferne den Prefix danach wieder
|
||||
|
|
|
@ -34,6 +34,11 @@ services:
|
|||
networks:
|
||||
- mail-relay
|
||||
- unifi-internal
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "--insecure", "https://localhost:8443"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
unifi-db:
|
||||
# Starte Container OHNE init-script
|
||||
|
@ -52,6 +57,11 @@ services:
|
|||
com.centurylinklabs.watchtower.enable: true
|
||||
networks:
|
||||
- unifi-internal
|
||||
healthcheck:
|
||||
test: ["CMD", "mongosh", "--eval", "db.stats().ok"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
######## Volumes ########
|
||||
volumes:
|
||||
|
|
Loading…
Reference in a new issue