version: '2' services: elasticsearch: image: 'docker.elastic.co/elasticsearch/elasticsearch-oss:7.3.1' container_name: elasticsearch_container ports: - "9200:9200" - "9300:9300" volumes: - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro - ./elasticsearch/data:/usr/share/elasticsearch/data - /etc/localtime:/etc/localtime:ro environment: ES_JAVA_OPTS: "-Xmx1024m -Xms1024m" networks: - elk_network kibana: image: 'docker.elastic.co/kibana/kibana-oss:7.3.1' container_name: kibana_container ports: - "5601:5601" volumes: - ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro - /etc/localtime:/etc/localtime:ro depends_on: - filebeat networks: - elk_network logstash: image: 'docker.elastic.co/logstash/logstash-oss:7.3.1' container_name: logstash_container ports: - "5000:5000" - "9600:9600" - "5044:5044" volumes: - ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:z - ./logstash/pipeline:/usr/share/logstash/pipeline:ro - /etc/localtime:/etc/localtime:ro environment: LS_JAVA_OPTS: "-Xmx1024m -Xms1024m" depends_on: - elasticsearch networks: - elk_network filebeat: image: 'docker.elastic.co/beats/filebeat-oss:7.3.1' container_name: filebeat_container depends_on: - logstash networks: - elk_network networks: elk_network: driver: bridge