This application receive a http multipart request with a image file, extract text using OCR from Tesseract and returns the result. I know it's not an UNIQUE project but my main goal is to make a fast and less resource intensive OCR web service.
- Docker - Platform and Software Deployment
- FastApi - Backend Frame-work.
- Nginx - For Load Balancing.
- ReactJs - Front-end Frame-work
Make sure you have git, nodejs, make and Docker installed.
$ git clone https://github.com/0x30c4/FastOCR
$ mkdir -p data/media/uploads
$ cd front-end
$ npm run build
$ cd -
$ docker volume create pgdata
If you want to take backup of the databse then you can backup the /var/lib/docker/volumes/pgdata
directory.
$ make build
$ make up # to run in the foreground.
or
$ make up op=-d # to run the container in background.
$ docker logs nginx_proxy # this is the nginx container.
$ docker logs ocr_api_srv # this is the FastApi app.
$ docker logs postgres # this is the postgres database.
You can add docker logs -f/--follow <container_name>
to follow log output
$ make down