diff --git a/contact-center/app/src/main/resources/application.properties b/contact-center/app/src/main/resources/application.properties index fc4a2794..d8241699 100644 --- a/contact-center/app/src/main/resources/application.properties +++ b/contact-center/app/src/main/resources/application.properties @@ -71,16 +71,11 @@ spring.freemarker.settings.number_format=0.### spring.data.jpa.repositories.enabled=true spring.data.redis.repositories.enabled=false # Elasticsearch +spring.elasticsearch.rest.uris=http://localhost:9200 +spring.data.elasticsearch.repositories.enabled=true # suppress inspection "SpringBootApplicationProperties" spring.data.elasticsearch.properties.path.data=../data # suppress inspection "SpringBootApplicationProperties" -spring.data.elasticsearch.cluster-name=elasticsearch -# suppress inspection "SpringBootApplicationProperties" -spring.data.elasticsearch.cluster-nodes=127.0.0.1:9300 -# suppress inspection "SpringBootApplicationProperties" -spring.data.elasticsearch.local=false -spring.data.elasticsearch.repositories.enabled=true -# suppress inspection "SpringBootApplicationProperties" spring.data.elasticsearch.properties.index.max_result_window=100000 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource diff --git a/docker-compose.yml b/docker-compose.yml index 2c0f9c6b..7591990c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -98,12 +98,14 @@ services: - "${REDIS_PORT:-8041}:6379" elasticsearch: - image: elasticsearch:2.4.6 - restart: always - volumes: - - ./database/elasticsearch/data:/usr/share/elasticsearch/data - - ./database/elasticsearch/config:/usr/share/elasticsearch/config - - ./database/elasticsearch/plugins:/usr/share/elasticsearch/plugins + # checkout spring data elasticsearch's document to known which version of es should be used. + # https://docs.spring.io/spring-data/elasticsearch/docs/3.2.6.RELEASE/reference/html/#preface.versions + image: elasticsearch:6.8.7 ports: - - "${ES_PORT1:-8039}:9200" - - "${ES_PORT2:-8040}:9300" + - 9200:9200 + - 9300:9300 + environment: + # override default cluster.name + - cluster.name=elasticsearch + # disable bootstrap check for development environment + - discovery.type=single-node