Nginx 健康检查命令
services:
mysql8:
image: mysql:8.0.36
#....忽略其他....
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
test
说明:模拟mysqladmin工具pingtimeout
说明:执行test最大等待时间,超时后也表示失败;默认为30sinterval
说明: 轮询时间间隔 10s 表示每隔10秒执行一次;默认为30sretries
说明:重试次数,失败后多少次重试
http://blog.xqlee.com/article/2503291635355185.html