修改 Docker compose 脚本

This commit is contained in:
xiaozzzi 2023-10-03 00:21:23 +08:00
parent 6e54fe484b
commit ca6912d144

View File

@ -28,13 +28,20 @@ services:
- "9999:9999"
networks:
- blossomnet
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9999/sys/alive"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
restart: always
depends_on:
- blmysql
blmysql:
condition: service_healthy
blmysql:
image: mysql:8.0.31
container_name: blossom-mysql
restart: always
restart: on-failure:3
# 【需修改】注意挂载路径
volumes:
- /d/blossom/Docker/mysql/data:/var/lib/mysql
@ -50,3 +57,8 @@ services:
- "3306:3306"
networks:
- blossomnet
healthcheck:
test: ["CMD", "mysqladmin", "-uroot", "-pjasmine888", "ping", "-h", "localhost"]
interval: 10s
timeout: 3s
retries: 12