all: wait for valkey to be healthy
Parents:
031a3721 file(s) changed
- docker-compose.yml +7 -1
docker-compose.yml
@@ -28,6 +28,12 @@ - ./etc/valkey.conf:/etc/valkey/valkey.conf
28 28 command: valkey-server /etc/valkey/valkey.conf
29 29 environment:
30 30 - ALLOW_EMPTY_PASSWORD=yes
31 + healthcheck:
32 + test: ["CMD", "valkey-cli", "ping"]
33 + interval: 10s
34 + timeout: 5s
35 + retries: 5
36 + start_period: 5s
31 37
32 38 api:
33 39 build: ./api
@@ -40,7 +46,7 @@ env_file:
40 46 - api/.env.development
41 47 depends_on:
42 48 valkey:
43 - condition: service_started
49 + condition: service_healthy
44 50 db:
45 51 condition: service_healthy
46 52 restart: always