From 466a180e55ff31094635835f4a4f4da588edb5c0 Mon Sep 17 00:00:00 2001 From: markliu2013 Date: Wed, 2 Aug 2023 01:33:40 +0800 Subject: [PATCH] save --- docker-compose.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b777271..86ab6d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,10 @@ services: MYSQL_DATABASE: moneywhere volumes: - moneywhere_mysql_data:/var/lib/mysql + healthcheck: + test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ] + timeout: 20s + retries: 10 phpmyadmin: image: registry.cn-hangzhou.aliyuncs.com/moneywhere/phpmyadmin:latest @@ -25,7 +29,8 @@ services: moneywhere-api-user: depends_on: - - mysql + mysql: + condition: service_healthy image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest env_file: api.env environment: