services:

# ELK services
## Elasticsearch service
  elasticsearch:
    build: elasticsearch/.
    container_name: elasticsearch
    restart: always
    environment:
     - bootstrap.memory_lock=true
     - ES_JAVA_OPTS=-Xms2048m -Xmx2048m
     - ES_TMPDIR=/tmp
    cap_add:
     - IPC_LOCK
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    mem_limit: 4g
    ports:
     - "127.0.0.1:64298:9200"
    image: "dtagdevsec/elasticsearch:24.04"
    volumes:
     - $HOME/tpotce/data:/data

## Kibana service
  kibana:
    build: kibana/.
    container_name: kibana
    restart: always
    stop_signal: SIGKILL
    depends_on:
      elasticsearch:
        condition: service_healthy
    mem_limit: 1g
    ports:
     - "127.0.0.1:64296:5601"
    image: "dtagdevsec/kibana:24.04"

## Logstash service
  logstash:
    build: logstash/.
    container_name: logstash
    restart: always
#    environment:
#     - LS_JAVA_OPTS=-Xms2048m -Xmx2048m
    depends_on:
      elasticsearch:
        condition: service_healthy
    image: "dtagdevsec/logstash:24.04"
    volumes:
     - $HOME/tpotce/data:/data
#     - /root/tpotce/docker/elk/logstash/dist/logstash.conf:/etc/logstash/conf.d/logstash.conf

# Map Redis Service
  map_redis:
    container_name: map_redis
    restart: always
    stop_signal: SIGKILL
    tty: true
    ports:
      - "127.0.0.1:6379:6379"
    image: "dtagdevsec/redis:24.04"
    read_only: true

# Map Web Service
  map_web:
    build: map/.
    container_name: map_web
    restart: always
    environment:
     - MAP_COMMAND=AttackMapServer.py
    stop_signal: SIGKILL
    tty: true
    ports:
     - "127.0.0.1:64299:64299"
    image: "dtagdevsec/map:24.04"
    depends_on:
     - map_redis

# Map Data Service
  map_data:
    container_name: map_data
    restart: always
    environment:
     - MAP_COMMAND=DataServer_v2.py
    stop_signal: SIGKILL
    tty: true
    image: "dtagdevsec/map:24.04"
    depends_on:
     - map_redis
