Setting Up Mayan EDMS OCR Convertor with Docker Compose

Ashok Raja T
Technology Specialist
June 30, 2019
Rate this article
Views    6730

Mayan EDMS is a popular Open Source OCR Convertor and Document Management System built with Django Python Web Framework. Internally, this uses Tesseract OCR, which is considered as the de-facto “OCR Engine” used by almost all OCR Convertor applications. In this article, let’s see how to set up the Mayan EDMS environment with Docker Compose and extract text content from OCR documents.

Key Features of Mayan EDMS

    • OCR Processing From Multiple Sources
      • Web UI
      • Email – POP3 & IMAP
      • Watch Folder
      • Staging Folder
    • Multilingual OCR Support
    • Document Versioning
    • Metadata – User Defined and Dynamic
    • Batch Processing
    • Full Text Search
    • Fine Grained Roles & Permissions
    • API Support For 3rd Party Applications
    • Storage Options
      • File Storage
      • AWS S3
      • My SQL Database

Docker Compose File ( docker-compose.yml)

version: '3'

services:
  mayandb:
    image: postgres:10
    container_name: mayan-edms-db
    ports:
      - 5432:5432
    environment:
      POSTGRES_DB: mayan
      POSTGRES_PASSWORD: m-pass
      POSTGRES_USER: mayan
    volumes:
      - $PWD/data/db:/var/lib/postgresql/data
    networks:
      - mayan-bridge
  mayanapp:
    image: mayanedms/mayanedms:3.1.10
    container_name: mayan-edms
    depends_on:
      - mayandb
    links:
      - mayandb:db
    ports:
      - 20201:8000
    environment:
      MAYAN_DATABASE_ENGINE: django.db.backends.postgresql
      MAYAN_DATABASE_HOST: db
      MAYAN_DATABASE_NAME: mayan
      MAYAN_DATABASE_PASSWORD: m-pass
      MAYAN_DATABASE_USER: mayan
      MAYAN_DATABASE_CONN_MAX_AGE: 60
    volumes:
      - $PWD/data/scanned_files:/srv/scanned_files
      - $PWD/data/watch_folder:/srv/watch_folder
      - $PWD/data/media:/var/lib/mayan 
    networks:
      - mayan-bridge

networks:
  mayan-bridge:
    driver: bridge

Key Points To Note

Mayan EDMS has a dependency on postgresql database. The above docker compose file creates a docker network, postrgresql db and configures the Mayan EDMS with that database.

“Scanned Files” and “Watch Folders” are mapped to local folders along with Mayan Application Files and Postgresql data files.

OutPut

Mayan EDMS OCR Screen

In my previous article on minimal Docker Compose file for Node Js, I have referred the local folder with dot notation. Using “$PWD” is the preferred way of approach but unfortunately this keyword won’t work in Windows.

Subscribe To Our Newsletter
Loading

Leave a comment