version: '3.8' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2 container_name: elasticsearch environment: - discovery.type=single-node - xpack.security.enabled=false ports: - "9200:9200" networks: - elastic kibana: image: docker.elastic.co/kibana/kibana:7.15.2 container_name: kibana environment: ELASTICSEARCH_HOSTS: http://elasticsearch:9200 ports: - "5601:5601" networks: - elastic logstash: image: docker.elastic.co/logstash/logstash:7.15.2 container_name: logstash volumes: - ./logstash-config/:/usr/share/logstash/pipeline/ environment: LS_JAVA_OPTS: "-Xmx256m -Xms256m" ports: - "5000:5000" - "9600:9600" networks: - elastic metricbeat: image: docker.elastic.co/beats/metricbeat:7.15.2 container_name: metricbeat command: metricbeat -e -E output.elasticsearch.hosts=["http://elasticsearch:9200"] depends_on: - elasticsearch networks: - elastic python-app: build: context: ./app dockerfile: Dockerfile container_name: python-app volumes: - ./app:/app networks: - elastic networks: elastic: driver: bridge