This commit is contained in:
markliu2013 2023-08-02 01:33:40 +08:00
parent 47f933291b
commit 466a180e55

View File

@ -10,6 +10,10 @@ services:
MYSQL_DATABASE: moneywhere MYSQL_DATABASE: moneywhere
volumes: volumes:
- moneywhere_mysql_data:/var/lib/mysql - moneywhere_mysql_data:/var/lib/mysql
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 10
phpmyadmin: phpmyadmin:
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/phpmyadmin:latest image: registry.cn-hangzhou.aliyuncs.com/moneywhere/phpmyadmin:latest
@ -25,7 +29,8 @@ services:
moneywhere-api-user: moneywhere-api-user:
depends_on: depends_on:
- mysql mysql:
condition: service_healthy
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest
env_file: api.env env_file: api.env
environment: environment: