Skip to content

Commit ca1780f

Browse files
committed
Try to fix elasticsearch failing in github action by bounding JVM memory and have the healthcheck retry 10 times.
1 parent 67a70bf commit ca1780f

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

docker-compose.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,6 @@ services:
226226
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbitmq_management path_prefix "/rabbitmq"
227227
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER:-guest}
228228
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASS:-guest}
229-
expose:
230-
- 5672
231-
- 15672
232-
# TODO remove
233-
ports:
234-
- "5672:5672"
235-
- "15672:15672"
236229
healthcheck:
237230
test: [ "CMD", "nc", "-z", "localhost", "5672" ]
238231
interval: 3s
@@ -247,14 +240,19 @@ services:
247240
image: docker.elastic.co/elasticsearch/elasticsearch:8.3.3
248241
restart: unless-stopped
249242
healthcheck:
250-
test: "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow"
243+
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow"]
244+
interval: 10s
245+
timeout: 30s
246+
retries: 10
247+
start_period: 60s
251248
networks:
252249
- clowder2
253250
environment:
254251
- "cluster.name=clowder2"
255252
- "discovery.type=single-node"
256253
- "xpack.security.enabled=false"
257254
- "xpack.security.http.ssl.enabled=false"
255+
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
258256
volumes:
259257
- elasticsearch:/usr/share/elasticsearch/data
260258

0 commit comments

Comments
 (0)