aboutsummaryrefslogblamecommitdiffstats
path: root/elk/docker-compose.yaml
blob: 21380b7f03c00fc150d6ad1315edaf906665635c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
              
         
                
                               

                                              



                       



                         
             

              

                             


                                      
                                    
           




                          



                         







                                      




                                                                    
         




                        



                         




                                             
                             

                     
            
                                                 

























                                                                
        

           
              

         
                  
                    
version: "3.8"
services:
  elasticsearch:
    image: elasticsearch:8.10.1
    volumes:
      - elk-data:/usr/share/elasticsearch/data
    deploy:
      resources:
        limits:
          memory: 3072M
    logging:
      driver: "json-file"
      options:
        max-size: "250m"
    networks:
      - lognet
    ports:
      - "127.0.0.1:9200:9200"
      - "127.0.0.1:9300:9300"
    environment:
      - ES_JAVA_OPTS=-Xms256m -Xmx256m
      - discovery.type=single-node
      - xpack.security.enabled=false
  logstash:
    image: logstash:8.10.1
    deploy:
      resources:
        limits:
          memory: 1024M
    logging:
      driver: "json-file"
      options:
        max-size: "250m"
    networks:
      - lognet
    depends_on:
      - elasticsearch
    environment:
      - MONITORING_ENABLED=true
      - LS_JAVA_OPTS=-Xms256m -Xmx256m
    ports:
      - "127.0.0.1:5044:5044"
      - "127.0.0.1:50000:50000"
    volumes:
      - ./logstash.yml:/usr/share/logstash/config/logstash.yml:ro
      - ./logstash.conf:/usr/share/logstash/pipline/logstash.conf:ro
  kibana:
    image: kibana:8.10.1
    deploy:
      resources:
        limits:
          memory: 1024M
    logging:
      driver: "json-file"
      options:
        max-size: "250m"
    environment:
      - ELASTICSEARCH_URL=http://elastic:9200
    networks:
      - lognet
    ports:
      - "127.0.0.1:5102:5601"
    depends_on:
      - elasticsearch
    volumes:
      - kibana-data:/usr/share/elasticsearch/data
  filebeat:
    image: docker.elastic.co/beats/filebeat:8.10.1
    deploy:
      resources:
        limits:
          memory: 256M
    logging:
      driver: "json-file"
      options:
        max-size: "250m"
    user: root
    command:
      - -e
      - --strict.perms=false
    networks:
      - lognet
    depends_on:
      - elasticsearch
    environment:
      - setup.kibana.host=kibana:5601
      - output.elasticsearch.hosts=["http://elasticsearch:9200"]
    volumes:
      - log-data:/logs/
      - /var/lib/docker/containers:/usr/share/dockerlogs/data:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
volumes:
  elk-data:
  log-data:
  kibana-data:
networks:
  lognet:
    driver: bridge
    attachable: true