version: '2'

services:
  elasticsearch:
    extends:
      file: ./elasticsearch/docker-compose.yml
      service: elasticsearch

  logstash:
    extends:
      file: ./logstash/docker-compose.yml
      service: logstash
    volumes:
      - ./logstash/pipeline:/usr/share/logstash/pipeline
      - pglog:/mnt/data:rw
    depends_on:
      - elasticsearch

  kibana:
    extends:
      file: ./kibana/docker-compose.yml
      service: kibana
    depends_on:
      - elasticsearch

  postgres:
    extends:
      file: ./postgres/docker-compose.yml
      service: master
    volumes:
      - pglog:/tmp
      - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
      - ./postgres/conf.d:/conf.d
      - ./postgres/scripts:/scripts

  pgadmin:
    extends:
      file: ./pgadmin/docker-compose.yml
      service: pgadmin

volumes:
  pgdata:
  pgadmin:
  pglog:
  esdata:

networks:
  esnet:
    driver: bridge

version: '2'

services:
  elasticsearch:
    extends:
      file: ./elasticsearch/docker-compose.yml
      service: elasticsearch

  logstash:
    extends:
      file: ./logstash/docker-compose.yml
      service: logstash
    volumes:
      - ./logstash/pipeline:/usr/share/logstash/pipeline
      - pglog:/mnt/data:rw
    depends_on:
      - elasticsearch

  kibana:
    extends:
      file: ./kibana/docker-compose.yml
      service: kibana
    depends_on:
      - elasticsearch

  postgres:
    extends:
      file: ./postgres/docker-compose.yml
      service: master

  pgadmin:
    extends:
      file: ./pgadmin/docker-compose.yml
      service: pgadmin

volumes:
  pgdata:
  pgadmin:
  pglog:
  esdata:

networks:
  esnet:
    driver: bridge

Move volumes to postgres folder
Move volumes to postgres folder