added healthchecks in compose example
All checks were successful
All checks were successful
This commit is contained in:
@@ -14,18 +14,33 @@ services:
|
||||
logging:
|
||||
options:
|
||||
max-size: 10m
|
||||
healthcheck:
|
||||
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
|
||||
start_period: 1m
|
||||
start_interval: 10s
|
||||
interval: 1m
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
logging:
|
||||
options:
|
||||
max-size: 10m
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
||||
start_period: 20s
|
||||
interval: 30s
|
||||
retries: 5
|
||||
timeout: 3s
|
||||
|
||||
glpi:
|
||||
build: .
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- 8282:80
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user