端口
This commit is contained in:
@@ -31,7 +31,7 @@ services:
|
||||
- school-news-network
|
||||
healthcheck:
|
||||
# 只有当 MySQL 可访问且敏感词表中至少有一条 deny 记录时,才认为 healthy
|
||||
test: ["CMD-SHELL", "mysql -uroot -p${MYSQL_ROOT_PASSWORD:-123456} -D ${MYSQL_DATABASE:-school_news} -e \"SELECT 'ok' FROM tb_sensitive_word WHERE type='deny' LIMIT 1;\" 2>/dev/null | grep -q ok"]
|
||||
test: ["CMD-SHELL", "mysql -uroot -p${MYSQL_ROOT_PASSWORD:-123456} -D ${MYSQL_DATABASE:-school_news} -e \"SELECT 'ok' FROM _db_init_status WHERE script_name='01-init-database.sql' AND status='success' LIMIT 1;\" 2>/dev/null | grep -q ok"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
|
||||
Reference in New Issue
Block a user