- You should have Docker installed.
- You should have tesseract-server up and running.
- You should have php (tested with php 7.3, php 7.4, php 8.0 & php 8.1).
- You should have tesseract-server up and running.
docker run --name tesseract-ocr-server-web-ui -d --restart unless-stopped -v <config_path>:/app/config -p <port>:8080 ghcr.io/m-primo/tesseract-ocr-server-web-ui:latest
Replace <config_path>
, with the app configuration path.
Replace <port>
, with the port you want the app to listen on.
After this, start from step number 4 in From Source.
-
Clone this repository:
git clone https://github.com/m-primo/tesseract-server-ui.git
-
Build the Docker image:
docker build -t tesseract-ocr-server-web-ui .
-
Run the Docker container (edit whatever you want):
docker run --name tesseract-ocr-server-web-ui -d --restart unless-stopped -v <config_path>:/app/config -p <port>:8080 tesseract-ocr-server-web-ui
Replace
<config_path>
, with the app configuration path. Replace<port>
, with the port you want the app to listen on. -
Create a Docker network to connect both containers to each other:
docker network create tesseract-network
-
Attach the network to the
tesseract-server
container (replace<tesseract-server-container-id>
with thetesseract-server
container id):docker network connect tesseract-network <tesseract-server-container-id>
-
Attach the network to the
tesseract-ocr-server-web-ui
container:docker network connect tesseract-network tesseract-ocr-server-web-ui
-
Get the IP of the
tesseract-server
container (replace<tesseract-server-container-id>
with thetesseract-server
container id):docker inspect <tesseract-server-container-id>
Then scroll to the very down of the response until you see an object called
Networks
and inside it another object calledtesseract-network
.Copy the value of a key called
"IPAddress"
. It should be like this172.18.0.2
. Copy it. -
Edit
config.php
to match the container IP you just copied. The finalconfig.php
should like this (notice that8884
is the internal port of thetesseract-server
port, not the port you exposed it):<?php $config = [ 'url' => 'http://172.18.0.2:8884', 'timeout' => 0, // 0 to disable ]; define('CFG', $config); ?>
-
Clone this repository:
git clone https://github.com/m-primo/tesseract-server-ui.git
-
Edit
config.php
to match the tesseract server host & port. The finalconfig.php
should like this:<?php $config = [ 'url' => 'http://127.0.0.1:8884', 'timeout' => 0, // 0 to disable ]; define('CFG', $config); ?>
-
Run the web ui with the PHP built-in development server (replace
<host>
with destination host -usually 127.0.0.1 or 0.0.0.0-, and<port>
with any port you want):php -S <host>:<port> -t ./app