Skip to content

Commit

Permalink
wip: Add health check to services #75
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Nouguier committed May 10, 2019
1 parent 16f237f commit 73a25aa
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
6 changes: 6 additions & 0 deletions services/deploy/grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 11 additions & 0 deletions services/deploy/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions services/deploy/registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions services/deploy/traefik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73a25aa

Please sign in to comment.