Compare commits

...

2 Commits
main ... health

Author SHA1 Message Date
b1aa7c3f7b healcheck ok for this stack 2025-01-13 17:02:57 +01:00
300c031aa6 promtail healthcheck not ok 2025-01-10 14:46:11 +01:00
2 changed files with 22 additions and 3 deletions

View File

@ -27,3 +27,4 @@ docker-compose up -d
- [ ] Pormtail config - [ ] Pormtail config
- [ ] TLS config (https) - [ ] TLS config (https)
- [ ] SSH logs - [ ] SSH logs
- [x] HealthCheck ok

View File

@ -1,7 +1,7 @@
version: '3.8' version: '3.8'
services: services:
# APP EXEMPLE # APP EXEMPLE
nginx-app: nginx-app:
container_name: nginx-app container_name: nginx-app
image: nginx image: nginx
@ -11,6 +11,12 @@ services:
logging_jobname: "containerlogs" logging_jobname: "containerlogs"
ports: ports:
- 8080:80 - 8080:80
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
grafana: grafana:
image: grafana/grafana:latest image: grafana/grafana:latest
@ -20,6 +26,12 @@ services:
volumes: volumes:
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources - ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./grafana/dashboards:/var/lib/grafana/dashboards - ./grafana/dashboards:/var/lib/grafana/dashboards
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
loki: loki:
image: grafana/loki:latest image: grafana/loki:latest
@ -30,6 +42,12 @@ services:
- ./loki/config:/etc/loki - ./loki/config:/etc/loki
- ./loki/certs:/etc/loki/certs - ./loki/certs:/etc/loki/certs
command: -config.file=/etc/loki/config.yml command: -config.file=/etc/loki/config.yml
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3100/ready"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
promtail: promtail:
image: grafana/promtail:latest image: grafana/promtail:latest