How to run Logstash on Docker-compose


(Patrick) #1

Logstash on Docker-compose ? How can we setup the config file


Logstash on Docker for AWS ECS
(Jymit Khondhu) #2
version: "3"
services:
  elasticsearch:
    image: elasticsearch
    ports: 
    - "9200:9200"
    - "9300:9300"
  kibana:
    image: kibana
    ports:
    - "5601:5601"
    links:
    - elasticsearch
    depends_on:
    - elasticsearch
  logstash:
    image: logstash
    links:
    - elasticsearch
    volumes:
    - ./:/config-dir
    command: logstash -f /config-dir/logstash.conf
    depends_on:
    - elasticsearch

Just use the section/s from above you need :slight_smile:


(Patrick) #3

Thanks @Jymit Can you tell Where can i specify my logstash config file


(Toby McLaughlin) #4

I generally recommend using a bind-mounted configuration file.