Files
tasks/develop/github/docker-compose.yml
T
Stephan BehnkeandGitHub b7676548e7 Docker compose healthchecks (#9335)
## What changed?

Add health checks for docker compose dependencies.

## Why?

Seeing connection timeouts for cass_es8
[[example](https://github.com/temporalio/temporal/actions/runs/22005015596/job/63897748984?pr=9292)]
that are failing tests.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks

Might make tests a little bit slower due to extra wait time.
2026-02-17 11:27:55 -08:00

110 lines
3.6 KiB
YAML

x-healthcheck-defaults: &healthcheck-defaults
interval: 3s
timeout: 3s
retries: 30
services:
cassandra:
image: cassandra:3.11
ports:
- "9042:9042"
environment:
CASSANDRA_LISTEN_ADDRESS: 127.0.0.1
MAX_HEAP_SIZE: "2G"
HEAP_NEWSIZE: "200M"
# Increase native transport threads for handling more concurrent connections
JVM_EXTRA_OPTS: "-Dcassandra.native_transport_max_threads=512"
healthcheck:
!!merge <<: *healthcheck-defaults
test: ["CMD-SHELL", "cqlsh -e 'describe cluster'"]
mysql:
image: mysql:8.0.29-oracle
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
command: --max-connections=500
volumes:
- ./mysql-init:/docker-entrypoint-initdb.d
healthcheck:
!!merge <<: *healthcheck-defaults
test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -proot"]
postgresql:
image: postgres:13.5
ports:
- "5432:5432"
environment:
POSTGRES_USER: temporal
POSTGRES_PASSWORD: temporal
command: postgres -c max_connections=500
volumes:
- ./postgresql-init:/docker-entrypoint-initdb.d
healthcheck:
!!merge <<: *healthcheck-defaults
test: ["CMD-SHELL", "pg_isready -U temporal"]
elasticsearch:
image: elasticsearch:7.10.1
ports:
- "9200:9200"
environment:
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
- cluster.routing.allocation.disk.watermark.high=256mb
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms1g -Xmx1g
healthcheck:
!!merge <<: *healthcheck-defaults
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
elasticsearch8:
image: elasticsearch:8.5.0
ports:
- "9200:9200"
environment:
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
- cluster.routing.allocation.disk.watermark.high=256mb
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
- discovery.type=single-node
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms1g -Xmx1g
healthcheck:
!!merge <<: *healthcheck-defaults
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
opensearch2:
image: opensearchproject/opensearch:2
ports:
- "9200:9200"
environment:
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
- cluster.routing.allocation.disk.watermark.high=256mb
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
- discovery.type=single-node
- DISABLE_SECURITY_PLUGIN=true
- OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g
healthcheck:
!!merge <<: *healthcheck-defaults
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
opensearch3:
image: opensearchproject/opensearch:3
ports:
- "9200:9200"
environment:
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
- cluster.routing.allocation.disk.watermark.high=256mb
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
- discovery.type=single-node
- DISABLE_SECURITY_PLUGIN=true
- OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g
healthcheck:
!!merge <<: *healthcheck-defaults
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]