diff --git a/services/deploy/grafana.yml b/services/deploy/grafana.yml index 31131752..d43b415b 100644 --- a/services/deploy/grafana.yml +++ b/services/deploy/grafana.yml @@ -7,6 +7,12 @@ services: - grafana_data:/var/lib/grafana - ./../configs/grafana/provisioning/:/etc/grafana/provisioning/ - ./../configs/grafana/grafana.ini:/etc/grafana/grafana.ini + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 1m networks: - kaabah-network deploy: diff --git a/services/deploy/prometheus.yml b/services/deploy/prometheus.yml index 79eae115..77e2906f 100644 --- a/services/deploy/prometheus.yml +++ b/services/deploy/prometheus.yml @@ -11,6 +11,12 @@ services: - '--storage.tsdb.path=/prometheus' - '--web.console.libraries=/usr/share/prometheus/console_libraries' - '--web.console.templates=/usr/share/prometheus/consoles' + healthcheck: + test: ["CMD", "wget", "-q", "--tries=1", "--spider", "http://localhost:9090/status"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 1m networks: - kaabah-network deploy: @@ -55,6 +61,11 @@ services: - '--config.file=/etc/alertmanager/alertmanager.yml' - '--storage.path=/alertmanager' - '--web.external-url=https://alertmanager.${SUBDOMAIN}' + healthcheck: + test: ["CMD", "wget", "-q", "--tries=1", "--spider", "http://localhost:9093/metrics"] + interval: 30s + timeout: 5s + start_period: 1m volumes: - ./../configs/prometheus/:/etc/alertmanager/ networks: diff --git a/services/deploy/registry.yml b/services/deploy/registry.yml index 65ffa6cf..651d1262 100644 --- a/services/deploy/registry.yml +++ b/services/deploy/registry.yml @@ -5,6 +5,12 @@ services: image: registry:2 ports: - 5000:5000 + healthcheck: + test: ["CMD", "wget", "-q", "--tries=1", "--spider", "http://localhost:5000/v2"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 1m networks: - kaabah-network deploy: diff --git a/services/deploy/traefik.yml b/services/deploy/traefik.yml index ceeb7481..3473f025 100644 --- a/services/deploy/traefik.yml +++ b/services/deploy/traefik.yml @@ -9,6 +9,12 @@ services: - ./../configs/traefik/traefik.toml:/traefik.toml - ./../logs:/logs - ./../acme:/acme + healthcheck: + test: ["CMD", "traefik", "healthcheck"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 1m ports: - target: 80 protocol: tcp