version: '3'
services:
  neo4j:
      image: neo4j:3.3.0
      container_name: neo4j_amundsen
      environment:
        - NEO4J_AUTH=neo4j/test
      ulimits:
        nofile:
          soft: 40000
          hard: 40000
      ports:
          - 7474:7474
          - 7687:7687
      volumes:
          - ./example/docker/neo4j/conf:/conf
          - ./.local/neo4j/data:/neo4j/data
      networks:
        - amundsennet
  elasticsearch:
      image: elasticsearch:6.7.0
      container_name: es_amundsen
      ports:
          - 9200:9200
      networks:
        - amundsennet
      ulimits:
        nofile:
          soft: 65536
          hard: 65536
      volumes:
        - ./.local/elasticsearch/data:/usr/share/elasticsearch/data
  amundsensearch:
      build:
        context: ./amundsensearchlibrary
        dockerfile: public.Dockerfile
      container_name: amundsensearch
      ports:
        - 5001:5001
      depends_on:
        - elasticsearch
      networks:
        - amundsennet
      environment:
        - PROXY_ENDPOINT=es_amundsen
  amundsenmetadata:
      build:
        context: ./amundsenmetadatalibrary
        dockerfile: public.Dockerfile
      container_name: amundsenmetadata
      depends_on:
        - neo4j
      ports:
        - 5002:5002
      networks:
        - amundsennet
      environment:
         - PROXY_HOST=bolt://neo4j_amundsen
  amundsenfrontend:
      build:
        context: ./amundsenfrontendlibrary
        args:
          SEARCHSERVICE_BASE: http://amundsensearch:5001
          METADATASERVICE_BASE: http://amundsenmetadata:5002
        dockerfile: local.Dockerfile
      container_name: amundsenfrontend
      depends_on:
        - amundsenmetadata
        - amundsensearch
      ports:
        - 5000:5000
      networks:
        - amundsennet
      environment:
        - SEARCHSERVICE_BASE=http://amundsensearch:5001
        - METADATASERVICE_BASE=http://amundsenmetadata:5002

networks:
  amundsennet:
