Skip to content

Commit 4c89637

Browse files
authored
Merge pull request #36 from sendbird/feature/docker-compose-dependency
Add healthcheck to docker-compose redis
2 parents 2b872df + 60944bc commit 4c89637

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

deploy/compose/docker-compose.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ services:
1212
command: ["python", "-m", "sbosc.controller.main"]
1313
restart: always
1414
depends_on:
15-
- redis
15+
redis:
16+
condition: service_healthy
1617

1718
eventhandler:
1819
<<: *component-base
@@ -49,6 +50,11 @@ services:
4950
volumes:
5051
- redis-data:/data
5152
- ./redis.conf:/usr/local/etc/redis/redis.conf
53+
healthcheck:
54+
test: ["CMD", "redis-cli", "ping"]
55+
interval: 10s
56+
timeout: 5s
57+
retries: 5
5258

5359
volumes:
5460
redis-data:

0 commit comments

Comments
 (0)