version: "3.7"

services:

  elasticsearch:
    image: "docker.elastic.co/elasticsearch/elasticsearch:7.6.2"
    environment:
      - "bootstrap.memory_lock=true"
      - "xpack.security.enabled=false"
      - "ES_JAVA_OPTS=-Xms640m -Xmx640m"
      - "discovery.type=single-node"
      - "cluster.name=field.dainst.org"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - "9200:9200"
    volumes:
      - "./data/elasticsearch:/usr/share/elasticsearch/data"

  api:
    build: "./api"
    ports:
      - "4000:4000"
    volumes:
      - "./api/lib:/opt/src/api/lib"

  worker:
    build: "./worker"
    volumes:
      - "./worker/config:/opt/src/worker/config"
      - "./worker/lib:/opt/src/worker/lib"

version: "3.7"

services:

  elasticsearch:
    image: "docker.elastic.co/elasticsearch/elasticsearch:7.6.2"
    environment:
      - "bootstrap.memory_lock=true"
      - "xpack.security.enabled=false"
      - "ES_JAVA_OPTS=-Xms640m -Xmx640m"
      - "discovery.type=single-node"
      - "cluster.name=field.dainst.org"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - "9200:9200"
    volumes:
      - "./data/elasticsearch:/usr/share/elasticsearch/data"

  api:
    build: "./api"
    ports:
      - "4000:4000"
    volumes:
      - "./api/config:/opt/src/api/config"
      - "./api/lib:/opt/src/api/lib"

  worker:
    build: "./worker"
    volumes:
      - "./worker/config:/opt/src/worker/config"
      - "./worker/lib:/opt/src/worker/lib"

Add volume for api/config folder
Add volume for api/config folder
