version: '3'

services:

  neo4j:
    image: neo4j:4.4.3
    ports: # expose the ports to the local machine
      - "7474:7474"
      - "${NEO4J_PORT}:7687"
    environment:
      - NEO4J_AUTH=${NEO4J_USER}/${NEO4J_PASS}
      - NEO4J_apoc_export_file_enabled=true
      - NEO4J_apoc_import_file_enabled=true
      - NEO4J_apoc_import_file_use__neo4j__config=true
      - NEO4JLABS_PLUGINS=["apoc"]
      # if necessary increase heap and page cache
      # - NEO4J_dbms_memory_heap_initial__size=28400m
      # - NEO4J_dbms_memory_heap_max__size=28400m
      # - NEO4J_dbms_memory_pagecache_size=57800m
    volumes:
      - ./2022_02_12_neo4j_maven/plugins:/plugins
      - ./2022_02_12_neo4j_maven/data:/data
      - ./2022_02_12_neo4j_maven/import:/import

  mongo:
    image: mongo:4.2
    ports: #expose ports to the outside
      - "${MONGO_PORT}:27017"
    volumes:
      - ./2022_07_14_mongodb/:/data/db
    environment:
      - MONGO_INITDB_ROOT_USERNAME=user
      - MONGO_INITDB_ROOT_PASSWORD=DUMMYPASSWORD
