ELK 791 Docker compose and security

Hi there! I would like to test the security functionnalities within a docker-compose stack.

Here is my stack :

version: '2'
services:
  # Noeud nodeB1
  nodeToutSeul:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.9.1
    container_name: nodeToutSeul
    environment:
      - node.name=nodeToutSeul
      - cluster.name=cluster_securite
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms1024m -Xmx2048m"
      - network.bind_host=0.0.0.0
      - xpack.security.enabled=true
      - xpack.license.self_generated.type=trial
    ports:
      - 9200:9200
    networks:
      - esnet
    volumes:
      - nodeToutSeul:/usr/share/nodeToutSeul/data 

  # Kibana  
  kibana_secu:
    image: docker.elastic.co/kibana/kibana:7.9.1
    container_name: kibana_secu
    environment:      
      SERVER_NAME: kibana_secu
      ELASTIC_USER: elastic
      ELASTIC_PASSWORD: "giMiG6FAB7ZGr0dliEzO"
      ELASTICSEARCH_HOSTS: '["http://nodeToutSeul:9200"]'
      xpack.monitoring.enabled: "false"
    ports:
     - 5601:5601
    networks:
      - esnet
      
# Définition des volumes   
volumes:
  nodeToutSeul:
    driver: local

# Définition du réseau entre les noeuds
networks:
  esnet:

I used the command bin/elasticsearch-setup-password auto to generate the passwords and I can access to the elasticsearch url (using port 9200)

However, my Kibana doesn't want to start... and I think I made a mistake into my docker-compose file...

Could you please help me?

Best regards

I finnaly found a solution using the volume to mount a kibana.yml :

version: '2'
services:
  # Noeud nodeB1
  nodeToutSeul:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.9.1
    container_name: nodeToutSeul
    environment:
      - node.name=nodeToutSeul
      - cluster.name=cluster_securite
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms1024m -Xmx2048m"
      - network.bind_host=0.0.0.0
      - xpack.security.enabled=true
      - xpack.license.self_generated.type=trial
    ports:
      - 9200:9200
    networks:
      - esnet
    volumes:
      - nodeToutSeul:/usr/share/nodeToutSeul/data 

  # Kibana  
  kibana_secu:
    image: docker.elastic.co/kibana/kibana:7.9.1
    volumes:
     - /root/kibana.yml:/usr/share/kibana/config/kibana.yml
    container_name: kibana_secu
    ports:
     - 5601:5601
    networks:
      - esnet
      
# Définition des volumes   
volumes:
  nodeToutSeul:
    driver: local

# Définition du réseau entre les noeuds
networks:
  esnet:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.