Environment avariable in ELK docker

Im settingup ELK in dockcer with docker-compose.
I have a question. Where do i can find evironment avariable setup for Elasticsearch, kibana image.
I knew we have option overwrite configuration file with this option

    volumes:
      - ./kibana.yml:/usr/share/kibana/config/kibana.yml

But i want use environment avariable instead of overwrite config.

Thank!

For elasticsearch, you can write things like:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:$ELASTIC_VERSION
    container_name: elasticsearch
    environment:
      - bootstrap.memory_lock=true
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms2g -Xmx2g"
      - cluster.routing.allocation.disk.threshold_enabled=false
      - xpack.license.self_generated.type=trial
      - xpack.monitoring.collection.enabled=true
      - xpack.security.enabled=true
      - ELASTIC_PASSWORD=$ELASTIC_PASSWORD
1 Like

thank @dadoonet,
Do you have full document about it?

This: Install Elasticsearch from archive on Linux or MacOS | Elasticsearch Guide [7.1] | Elastic

Any settings that can be specified in the config file can also be specified on the command line, using the -E syntax as follows:

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