The Jochre Search server provides OCR search functionality.
First, open the console and clone the project using git
(or you can simply download the project) and then change the directory:
git clone [email protected]:joliciel/jochre3-search.git
cd jochre3-search
Navigate to the project directory, and create a file docker-compose/jochre.conf
based on docker-compose.jochre-sample.conf
.
Run the docker-compose script:
docker-compose -p jochre -f docker-compose/jochre3-search.yml up
You can then navigate to the Swagger documentation as follows: http://localhost:4242/docs/
If the application is setup for raw authorization, click on Authorize
, and enter the following string:
{"username": "Test", "email": "[email protected]", "roles": ["index"]}
Navigate to the project directory, and run the application as follows:
make init-dev-env
sbt
project api
run
You can then navigate to the Swagger documentation as follows: http://localhost:4242/docs/
See above for authorization.
Create your environment variables:
export JOCHRE3_DOCKER_REGISTRY=registry.gitlab.com
export [email protected]
Either create an additional JOCHRE3_DOCKER_PASSWORD variable, or (more secure) add the password to pass:
pass insert jochre/sonatype_deploy
Run the publish script
make publish-image
For the CI script in .gitlab-ci.yml to work, you first need to set up a runner with gitlab-runner
(the docker image below needs to correspond to the one in the yml file):
sudo gitlab-runner register \
--non-interactive \
--url "https://gitlab.com/" \
--registration-token $REGISTRATION_TOKEN \
--executor "docker" \
--description "Docker runner" \
--docker-image "docker:24" \
--docker-privileged
It will automatically deploy a docker image on tags, on the condition that you add two variables to the Gitlab CI settings: JOCHRE3_DOCKER_USERNAME
and JOCHRE3_DOCKER_PASSWORD
.