@@ -46,6 +46,35 @@ services:
4646 interval : 10s
4747 timeout : 5s
4848 retries : 5
49+ elasticsearch :
50+ image : docker.elastic.co/elasticsearch/elasticsearch:8.17.4
51+ volumes :
52+ - esdata:/usr/share/elasticsearch/data
53+ environment :
54+ # Comment-out the line below for a cluster of multiple nodes
55+ - discovery.type=single-node
56+ # Uncomment the line below below for a cluster of multiple nodes
57+ # - cluster.name=docker-cluster
58+ - xpack.ml.enabled=false
59+ - xpack.security.enabled=false
60+ - thread_pool.search.queue_size=5000
61+ - logger.org.elasticsearch.discovery="ERROR"
62+ # -XX:UseSVE=0 is necessary for Apple M4 architecture
63+ - " ES_JAVA_OPTS=-Xms${ELASTIC_MEMORY_SIZE} -Xmx${ELASTIC_MEMORY_SIZE} -XX:+IgnoreUnrecognizedVMOptions -XX:UseSVE=0"
64+ - " CLI_JAVA_OPTS=-XX:+IgnoreUnrecognizedVMOptions -XX:UseSVE=0"
65+ restart : always
66+ ulimits :
67+ memlock :
68+ soft : -1
69+ hard : -1
70+ nofile :
71+ soft : 65536
72+ hard : 65536
73+ healthcheck :
74+ test : curl -s http://elasticsearch:9200 >/dev/null || exit 1
75+ interval : 30s
76+ timeout : 10s
77+ retries : 50
4978 openbas :
5079 image : openbas/platform:1.15.2
5180 environment :
@@ -67,6 +96,8 @@ services:
6796 - OPENBAS_RABBITMQ_HOSTNAME=rabbitmq
6897 - OPENBAS_RABBITMQ_USER=${RABBITMQ_DEFAULT_USER}
6998 - OPENBAS_RABBITMQ_PASS=${RABBITMQ_DEFAULT_PASS}
99+ # ELASTICSEARCH
100+ - ENGINE_URL=http://elasticsearch:9200
70101 # SPRING MAIL Configurations
71102 - SPRING_MAIL_HOST=${SPRING_MAIL_HOST}
72103 - SPRING_MAIL_PORT=${SPRING_MAIL_PORT}
@@ -95,6 +126,8 @@ services:
95126 condition : service_healthy
96127 rabbitmq :
97128 condition : service_healthy
129+ elasticsearch :
130+ condition : service_started
98131 restart : always
99132 healthcheck :
100133 test : [ "CMD", "wget", "-qO-", "http://openbas:8080/api/health?health_access_key=${OPENBAS_HEALTHCHECK_KEY}" ]
@@ -129,3 +162,4 @@ volumes:
129162 pgsqldata :
130163 s3data :
131164 amqpdata :
165+ esdata :
0 commit comments