Skip to content

Commit

Permalink
chore: add condition check in docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
AkagiYui committed Aug 25, 2024
1 parent 60f6277 commit 8b64443
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ services:
- /srv/kenko-drive/data:/app/data
restart: always
depends_on:
- redis
- mysql
redis:
condition: service_healthy
mysql:
condition: service_healthy

redis:
image: redis:7-alpine
Expand All @@ -20,6 +22,11 @@ services:
ports:
- "6677:6677"
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 3

mysql:
image: mysql:8
Expand All @@ -32,6 +39,9 @@ services:
volumes:
- /srv/kenko-drive/mysql/data:/var/lib/mysql
restart: always
healthcheck:
test: [ "CMD", "mysql", "-uroot", "-proot", "-e", "SELECT 1" ]
interval: 10s

minio:
image: minio/minio
Expand Down

0 comments on commit 8b64443

Please sign in to comment.