spujadas / elk-docker

Elasticsearch, Logstash, Kibana (ELK) Docker image
Other
2.16k stars 907 forks source link

Issues running on AWS Fargate #373

Open diondree opened 2 years ago

diondree commented 2 years ago

Hello, im currently trying to run this image on AWS Fargate using docker compose. I am stuck at the mmap boostrap check because Fargate doesnt allow you to change that but i see there's an option to disable that via the setting the environment variable to ES_SETTING_NODE_STORE_ALLOW__MMAP=false but after doing that nothing changes so wanted to know if its just not being passed based on how this image is configured. Below is my docker-compose.yml for further reference.

version: '2'

services:
  elk:
    image: sebp/elk
    container_name: elk
    ulimits: 
      nofile:
        soft: 65536
        hard: 65536
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 4096M

    environment:
      - ES_SETTING_NODE_STORE_ALLOW__MMAP=false
      - discovery.type=single-node
    ports:
      - "5601:5601"
      - "9200:9200"
      - "5044:5044"
spujadas commented 2 years ago

Interesting, had never seen this env var before.

Due to the way Linux services run, env vars passed to the container won’t be seen by said services as is. I think the easiest way to pass the ES_SETTING_NODE_STORE_ALLOW__MMAP env var to Elasticsearch would be to add it to the /etc/default/elasticsearch file in the image (e.g. take https://github.com/spujadas/elk-docker/blob/master/elasticsearch-default, add ES_SETTING_NODE_STORE_ALLOW__MMAP=false, bind-mount the updated file to /etc/default/elasticsearch using docker-compose.yml).

Hope that helps.

diondree commented 2 years ago

Hi @spujadas, thanks alot for this, will give it a shot and let you know if that works.