version: "3.9"

services:

  dlu:
    image: gitlab.informatik.uni-bremen.de:5005/ease-ph/dlu/dlu/dlu:latest
    expose:
      - 8000
    environment:
      SECRET_KEY: USE_A_SECRET_KEY_HERE
      NLP_URL: http://scg:8080
      FUSEKI_URL: http://fuseki:3030/dlu/
      SERVER_NAME: localhost
      APPLICATION_ROOT: /dlu/
      STATIC_PATH: /dlu/static/
      PREFERRED_URL_SCHEME: http
      # Note that this is the debug server, for a real deployment adjust
      # the environment variables, delete the FLASK_ environment variables
      # and remove the `command` section, as the docker image per default runs
      # a production ready gunicorn wsgi server
      FLASK_APP: dlu_app.app:create_app
      FLASK_ENV: development
    command: flask run --host=0.0.0.0 --port 8000
    restart: unless-stopped

  scg:
    image: gitlab.informatik.uni-bremen.de:5005/ease-ph/dlu/dlu/scg:latest
    expose:
      - 8080
    restart: unless-stopped

  nginx:
    image: nginx:1.15.5-alpine
    ports:
      - "80:80"
    volumes:
      - ./tools/nginx/conf.d:/etc/nginx/conf.d:ro
      - ./tools/nginx/html:/usr/share/nginx/html:ro
    restart: unless-stopped

  fuseki:
    image: gitlab.informatik.uni-bremen.de:5005/ease-ph/dlu/dlu/fuseki:latest
    command: [ "--tdb2", "--loc=databases", "--update", "/dlu" ]
    volumes:
      - ./fuseki/logs:/fuseki/logs
      - ./fuseki/databases:/fuseki/databases
    ports:
      - "3031:3030"
