Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES-2038: Optimize container dependencies in Compose file #102

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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