Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

single node elasticsearch with enable security basic in docker

version: '3'

services:
  create_certs:
    container_name: create_certs
    image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3
    command: >
      bash -c '
        if [[ ! -f ./config/certificates/elastic-certificates.p12 ]]; then
          bin/elasticsearch-certutil cert -out config/certificates/elastic-certificates.p12 -pass ""
        fi;
        chown -R 1000:0 /usr/share/elasticsearch/config/certificates
      '
    user: "0"
    working_dir: /usr/share/elasticsearch
    volumes: ['certs:/usr/share/elasticsearch/config/certificates']

  elasticsearch:
    container_name: elasticsearch
    depends_on: [create_certs]
    image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - ELASTIC_PASSWORD=MyPassword # password for default user: elastic 
      - xpack.security.enabled=true
      - xpack.security.transport.ssl.enabled=true
      - xpack.security.transport.ssl.verification_mode=certificate
      - xpack.security.transport.ssl.keystore.path=/usr/share/elasticsearch/config/certificates/elastic-certificates.p12
      - xpack.security.transport.ssl.truststore.path=/usr/share/elasticsearch/config/certificates/elastic-certificates.p12
    volumes: ['esdata:/usr/share/elasticsearch/data', 'certs:/usr/share/elasticsearch/config/certificates']
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
      memlock:
        soft: -1
        hard: -1
    ports:
      - "9200:9200"

  kibana:
    container_name: kibana
    depends_on: [elasticsearch]
    image: docker.elastic.co/kibana/kibana:7.9.3
    environment:
      - ELASTICSEARCH_USERNAME=elastic
      - ELASTICSEARCH_PASSWORD=MyPassword
    ports:
      - "5601:5601"

volumes: {"esdata", "certs"}
Comment

PREVIOUS NEXT
Code Example
Javascript :: user agents regex for mobile 
Javascript :: what is download api javascript 
Javascript :: list pci express version command line 
Javascript :: javascript check alpha and space only 
Javascript :: iron_to_nugget.json 
Javascript :: Leaflet.KMLGroundOverlay kmz 
Javascript :: bassed on text length find offset width in javascript 
Javascript :: how create array with names of files in folder nodejs 
Javascript :: sample of jstree ajax call code farm 
Javascript :: xrm javascript get value from form 
Javascript :: for(let [key,val] in obj){ messageBody = messageBody.replace("{"+ key + "}",val) } 
Javascript :: json2csv parse with flatten example javascript 
Javascript :: javascript random point on unit sphere 
Javascript :: javascript path folder above 
Javascript :: react addon update 
Javascript :: d3js circle out of scrren 
Javascript :: função que retorna uma media aritmética javascript 
Javascript :: contact form7 404 wp-json feedback 
Javascript :: react native sovrapporre immagini 
Javascript :: como fazer elementos que scroll diferente 
Javascript :: warning Non-interactive elements should not be assigned mouse or keyboard event listeners jsx-a11y/no-noninteractive-element-interactions 
Javascript :: how to DELETE "/api/notes" with an id 
Javascript :: react conditional if localhost 
Javascript :: telegraf force_reply 
Javascript :: node-emoji list 
Javascript :: reactjs web3 components 
Javascript :: es6 strip child is null from object 
Javascript :: Uncaught ReferenceError: jQuery is not defined at (index): "405" 
Javascript :: jquery user function override 
Javascript :: get each primary colour and add into an array javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =