Skip to content

Commit

Permalink
ES-2038: Optimize container dependencies in Compose file (#102)
Browse files Browse the repository at this point in the history
* ES-2038: Optimize container dependencies in Compose file

* ES-2038: Finesse healthcheck timings

* ES-2038: fix FATAL postgres logging
  • Loading branch information
tlawson3 authored Mar 28, 2024
1 parent ac2fbba commit a81aed1
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: pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}
interval: 10s
timeout: 5s
retries: 10
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 a81aed1

Please sign in to comment.