Skip to content

Commit

Permalink
ES-2038: Optimize container dependencies in Compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
tlawson3 committed Mar 28, 2024
1 parent ac2fbba commit f8940f1
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions config/combined-worker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
version: '2'
version: '2.1'
services:
postgresql:
image: postgres:14.10
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "${POSTGRES_DB}" ]
interval: 30s
timeout: 60s
retries: 5
restart: unless-stopped
tty: true
environment:
Expand All @@ -13,6 +18,11 @@ services:

kafka:
image: confluentinc/cp-kafka:7.6.0
healthcheck:
test: kafka-topics --bootstrap-server kafka:29092 --list
interval: 30s
timeout: 10s
retries: 3
ports:
- 9092:9092
environment:
Expand All @@ -34,7 +44,8 @@ services:
kafka-create-topics:
image: corda-os-docker.software.r3.com/corda-os-plugins:${CORDA_RUNTIME_VERSION}
depends_on:
- kafka
kafka:
condition: service_healthy
command: [
"topic",
"-b=kafka:29092",
Expand All @@ -45,9 +56,12 @@ services:
corda:
image: corda-os-docker.software.r3.com/corda-os-combined-worker-kafka:${CORDA_RUNTIME_VERSION}
depends_on:
- postgresql
- kafka
- kafka-create-topics
postgresql:
condition: service_healthy
kafka:
condition: service_healthy
kafka-create-topics:
condition: service_completed_successfully
volumes:
- ../config:/config
- ../logs:/logs
Expand Down

0 comments on commit f8940f1

Please sign in to comment.