docker-compose安装

docker pull mobz/elasticsearch-head:5
docker run -d -p 9100:9100 docker.io/mobz/elasticsearch-head:5




编辑 /etc/sysctl.conf,追加以下内容:
vm.max_map_count=655360
保存后,执行:
sysctl -p

重新启动,成功。

docker-compose.yml

version: '3'
services:
  elastic:
    image: elasticsearch:5.6.9
    container_name: elastic
    environment:
      - TZ='Asia/Shanghai'
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"     
    ports:
      - 9200:9200
      - 9300:9300

Gruntfile.js修改以下片段,

 connect: {
            server: {
                options: {
                    /* 默认监控:127.0.0.1,修改为:0.0.0.0 */
                    hostname: '0.0.0.0',
                    port: 9100,
                    base: '.',
                    keepalive: true
                }

app.js修改以下代码片段:

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";
在最后几行

你可能感兴趣的:(微服务架构)