Docker installation guide

The receipt-parser-server image gets built automatically using the Docker Hub. The installation is very simple. First pull the image from Docker hub.

docker pull monolidth/receipt-parser:latest

Manual

You could also run the Docker image without the launcher script e.g.

docker run -i -t -p [YOUR-IP]:8721:8721  monolidth/receipt-parser

Developer installation guide

Clone the repository

First clone the GitHub project.

git clone https://github.com/ReceiptManager/receipt-parser-server

Install project dependencies

Please notice that you install following packages with your favorite package manager:

  • python

  • python-pip

  • libmagickwand-dev

  • tesseract-ocr-all

  • libgl1-mesa-glx

  • libmagickwand-dev

  • qrencode

apt-get install python python-pip libmagickwand-dev tesseract-ocr-all libgl1-mesa-glx libmagickwand-dev

Install python dependencies

Now, install all python dependencies using pip the following

pip install -r requirements.txt

Generate SSL certificates

Now, generate new SSL certificates. First, generate a new file called .private_key and type your favourite password. Please submit at least 8 characters. You can do this using echo like:

echo "favorite_password" > .private_key

The password is used to generate the root certificate. Generate the cert files using

make generate_cert

Now, you should see new certificates located in cert folder which is located in the root directory.

ls cert

The output looks like the following

rootCA.key  rootCA.pem  rootCA.srl  server.crt  server.csr  server.csr.cnf  server.key  v3.ext

Run the server

Now, you are ready to run the Receipt Parser Server.

make serve

Verify installation

If you run the Docker image. The output should like similar to:

...
INFO:     Started server process [16322]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on https://0.0.0.0:8721 (Press CTRL+C to quit)

The API token in printed on the screen. Additionally, you can scan the QR code.

Current API token: XXXXXXXX