version: '3.6'
services:

  ###############################################
  # Postgres DB
  ###############################################
  db:
    image: postgres:9.6.1
    environment:
      POSTGRES_PASSWORD: adminadmin
      POSTGRES_DB: office-alexander-logistics
    volumes: 
      - dbdata:/var/lib/postgresql/data
      
  ###############################################
  # Office
  ###############################################
  app:
    image: imixs/office-alexander-logistics
    depends_on:
      - db
    environment:
      JAVA_OPTS: "-Dnashorn.args=--no-deprecation-warning"
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "adminadmin"
      POSTGRES_CONNECTION: "jdbc:postgresql://db/office-alexander-logistics"
      TZ: "CET" 
      LANG: "en_US.UTF-8"
      MAILGATEWAY: "mailgateway"

      ASYNCEVENT_PROCESSOR_ENABLED: "true"
      ASYNCEVENT_PROCESSOR_INITIALDELAY: "10000"
      ASYNCEVENT_PROCESSOR_INTERVAL: "5000"
      OCR_SERVICE_ENDPOINT: "http://tika:9998/tika"
      OCR_SERVICE_MODE: "MODEL"
      #OCR_SERVICE_MAXFILESIZE: "1048576"
      #OCR_PDF_MODE: "OCR_ONLY | TEXT_ONLY | TEXT_AND_OCR (default)" 
      OCR_PDF_MODE: "OCR_ONLY"

      LLM_SERVICE_ENDPOINT_USER: "admin"
      LLM_SERVICE_ENDPOINT_PASSWORD: "imixs4.null"

    ports:
      - "8080:8080"
      - "9990:9990"
      - "8787:8787"
    volumes:
      - ./docker/deployments:/opt/jboss/wildfly/standalone/deployments/
  

  ###############################################
  # Tika OCR Service
  ###############################################
  tika: 
    #image: apache/tika:latest
    #image: apache/tika:1.24.1-full
    image: apache/tika:2.4.1-full
    environment:
      TZ: "Europe/Berlin"
    ports:
      - "9998:9998"  



  ###############################################
  # Imixs-Admin
  ###############################################
  imixsadmin:
    image: imixs/imixs-admin
    ports:
      - "8888:8080"

  ###############################################
  # Mailgateway
  ###############################################
  mailgateway:
    image: imixs/exim4
    environment:
      EXIM_SMARTHOST: "www149.your-server.de:25"
      EXIM_PASSWORD: "www149.your-server.de:webmaster@imixs.com:$MAILPASSWORD"
      EXIM_ALLOWED_SENDERS: "10.0.0.0/8:172.16.0.0/12:192.168.0.0/16"  


      
volumes:
  dbdata:      




