diff --git a/docker-compose.yml b/docker-compose.yml index d0eebfb..5d6ddc0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,24 @@ services: - "8080:8080" networks: - net - + + elasticsearch: + image: 'docker.elastic.co/elasticsearch/elasticsearch:6.7' + restart: always + container_name: elasticsearch + hostname: elasticsearch + environment: + - cluster.name=elasticsearch + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - ./esdata:/usr/share/elasticsearch/data + expose: + - 9200 + networks: + - net + networks: net: diff --git a/web/index.js b/web/index.js index 82692d9..e45927c 100644 --- a/web/index.js +++ b/web/index.js @@ -3,7 +3,7 @@ const http = require('http'), es = require('elasticsearch'), express = require('express'), bodyParser = require('body-parser'), - client = new es.Client({ host: 'http://192.168.1.130:9200' }), + client = new es.Client({ host: 'http://elasticsearch:9200' }), app = express(), router = express.Router(), server = http.createServer(app).listen(8080, () => {