version: "3.7" services: es1: image: harbor.colben.cn/general/elasticsearch:6 container_name: es1 restart: "on-failure" stop_grace_period: 5m privileged: true environment: ES_JAVA_OPTS: "-Xms8g -Xmx8g" _CONF_cluster.name: myes _CONF_node.name: es1 _CONF_network.bind_host: '[127.0.1.1,127.0.2.1]' _CONF_network.publish_host: 127.0.3.1 _CONF_http.port: 9200 _CONF_transport.port: 9300 _CONF_discovery.zen.ping.unicast.hosts: '[127.0.3.1,127.0.3.2,127.0.3.3]' _CONF_discovery.zen.minimum_master_nodes: 2 _CONF_gateway.recover_after_nodes: 2 network_mode: host volumes: - type: bind source: ./es1/config target: /opt/es/config - type: bind source: ./es1/data target: /opt/es/data - type: bind source: ./es1/logs target: /opt/es/logs - type: bind source: ./es1/plugins target: /opt/es/plugins - type: bind source: ./es1/offline-plugins target: /opt/es/offline-plugins es2: image: harbor.colben.cn/general/elasticsearch:6 container_name: es2 restart: "on-failure" stop_grace_period: 5m privileged: true environment: ES_JAVA_OPTS: "-Xms8g -Xmx8g" _CONF_cluster.name: myes _CONF_node.name: es2 _CONF_network.bind_host: '[127.0.1.2,127.0.2.2]' _CONF_network.publish_host: 127.0.3.2 _CONF_http.port: 9200 _CONF_transport.port: 9300 _CONF_discovery.zen.ping.unicast.hosts: '[127.0.3.1,127.0.3.2,127.0.3.3]' _CONF_discovery.zen.minimum_master_nodes: 2 _CONF_gateway.recover_after_nodes: 2 network_mode: host volumes: - type: bind source: ./es2/config target: /opt/es/config - type: bind source: ./es2/data target: /opt/es/data - type: bind source: ./es2/logs target: /opt/es/logs - type: bind source: ./es2/plugins target: /opt/es/plugins - type: bind source: ./es2/offline-plugins target: /opt/es/offline-plugins es3: image: harbor.colben.cn/general/elasticsearch:6 container_name: es3 restart: "on-failure" stop_grace_period: 5m privileged: true environment: ES_JAVA_OPTS: "-Xms8g -Xmx8g" _CONF_cluster.name: myes _CONF_node.name: es3 _CONF_network.bind_host: '[127.0.1.3,127.0.2.3]' _CONF_network.publish_host: 127.0.3.3 _CONF_http.port: 9200 _CONF_transport.port: 9300 _CONF_discovery.zen.ping.unicast.hosts: '[127.0.3.1,127.0.3.2,127.0.3.3]' _CONF_discovery.zen.minimum_master_nodes: 2 _CONF_gateway.recover_after_nodes: 2 network_mode: host volumes: - type: bind source: ./es3/config target: /opt/es/config - type: bind source: ./es3/data target: /opt/es/data - type: bind source: ./es3/logs target: /opt/es/logs - type: bind source: ./es3/plugins target: /opt/es/plugins - type: bind source: ./es3/offline-plugins target: /opt/es/offline-plugins