elasticsearch embedded
This commit is contained in:
parent
42ffa73bba
commit
f26d824aae
@ -12,6 +12,24 @@ services:
|
|||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
networks:
|
networks:
|
||||||
- net
|
- 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:
|
networks:
|
||||||
net:
|
net:
|
||||||
|
@ -3,7 +3,7 @@ const http = require('http'),
|
|||||||
es = require('elasticsearch'),
|
es = require('elasticsearch'),
|
||||||
express = require('express'),
|
express = require('express'),
|
||||||
bodyParser = require('body-parser'),
|
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(),
|
app = express(),
|
||||||
router = express.Router(),
|
router = express.Router(),
|
||||||
server = http.createServer(app).listen(8080, () => {
|
server = http.createServer(app).listen(8080, () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user