Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update stable #102

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
482da31
Update README.md
markusweigelt Sep 11, 2023
618fa6b
Update README.md
markusweigelt Sep 11, 2023
b8ca1e8
Create LICENSE
markusweigelt Sep 11, 2023
acefabf
update Manager+Monitor
bertsky Dec 13, 2023
572429d
update Manager
bertsky Dec 14, 2023
0f33308
Update .env
markusweigelt Dec 14, 2023
454b2c9
update Manager
bertsky Dec 14, 2023
6f6fbeb
update Manager
bertsky Dec 14, 2023
09b442f
update Manager
bertsky Dec 15, 2023
059edd8
Merge pull request #95 from bertsky/update-ocrd
bertsky Dec 15, 2023
b6ab5e9
Merge pull request #96 from slub/add-root-user-envs
bertsky Dec 15, 2023
aa185df
CI: verify that all services are actually running
bertsky Dec 16, 2023
34e8038
Merge pull request #97 from slub/ci-ensure-all-services
bertsky Dec 16, 2023
b0ebb50
Update Kitodo.Production to current state and update manager
markusweigelt Dec 20, 2023
25e3262
Update manager
markusweigelt Dec 20, 2023
dfa4afe
Update manager
markusweigelt Dec 20, 2023
5a42219
Remove confirmation before docker compose down
markusweigelt Dec 20, 2023
31ca84c
Update manager
markusweigelt Dec 20, 2023
56bb6d9
Improve example sql and add example for workflow selection and ensure…
markusweigelt Dec 20, 2023
cae886d
Update manager and add manager docker logs in makefile ci
markusweigelt Dec 21, 2023
1297393
Improve makefile and update manager
markusweigelt Dec 21, 2023
cd8d86f
Change default behaviour sync/async
markusweigelt Jan 9, 2024
9ea19ab
Update manager
markusweigelt Jan 9, 2024
5f8df78
Add OCR-D Manager base version to .env, docker-compose.yml and CI
markusweigelt Jan 10, 2024
d63ff10
Update submodules
markusweigelt Feb 21, 2024
657a6cf
Update _resources/kitodo/data/scripts/script_ocr_process_dir.sh
markusweigelt Mar 1, 2024
ca326b0
Update submodules
markusweigelt Mar 1, 2024
598afec
Update manager
markusweigelt Mar 1, 2024
d38aca5
Update files
markusweigelt Mar 4, 2024
559479e
Merge branch 'main' into adjustments-webhook
markusweigelt Mar 4, 2024
19dd109
test-kitodo: run docker exec without terminal
bertsky Mar 5, 2024
ada6a21
Update makefile-ci.yml
markusweigelt Mar 5, 2024
c620c67
Update makefile-ci.yml
markusweigelt Mar 5, 2024
5ef0b19
Update makefile-ci.yml
markusweigelt Mar 5, 2024
b8a3885
Update makefile-ci.yml
markusweigelt Mar 5, 2024
c59b4cb
.env: set MONITOR_DB_ROOT_PASSWORD
bertsky Mar 7, 2024
a578e28
.env: set MONITOR_DB_ROOT_PASSWORD
bertsky Mar 7, 2024
0532c58
test-kitodo: try to wait for ocrd-database, too
Mar 7, 2024
98a91a7
update Controller
Mar 7, 2024
4e7495b
update Monitor (no Controller dependency)
Mar 7, 2024
078015c
Merge remote-tracking branch 'origin/adjustments-webhook' into adjust…
Mar 7, 2024
c88ecce
update Controller to new ocrd/all
Mar 7, 2024
4ad77d0
update Manager to #73
Mar 7, 2024
f2066a6
update Monitor
Mar 8, 2024
9e013c6
update CONTROLLER_BASE_VERSION
bertsky Mar 8, 2024
74321e9
update submodules to master/main
Mar 8, 2024
3f293ac
Merge pull request #98 from slub/adjustments-webhook
bertsky Mar 9, 2024
6c27542
Merge remote-tracking branch 'origin/main' into manager-base-version
Mar 9, 2024
245a4f6
Merge pull request #100 from slub/manager-base-version
bertsky Mar 9, 2024
6d61679
publish-documentation.yml: use py38
bertsky Mar 9, 2024
36fdae3
makefile-ci.yml: also on stable
bertsky Mar 9, 2024
98718aa
Rename makefile-ci.yml to test-ci.yml
markusweigelt Mar 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
COMPOSE_PROJECT_NAME=ocrd_kitodo

# Manager SSH server
MANAGER_BASE_VERSION=latest # tag of ocrd/core from stage version
MANAGER_IMAGE=ghcr.io/slub/ocrd_manager:latest # name and tag of image
MANAGER_HOST=ocrd-manager # name/address of server (for Kitodo)
MANAGER_PORT_SSH=9022 # host-side port to exposed SSH server (for external Kitodo)
Expand All @@ -19,9 +20,11 @@ MONITOR_HOST=ocrd-monitor # name/address of server
MONITOR_PORT_WEB=5000 # host-side port to exposed Web server
MONITOR_PORT_LOG=8088 # host-side port to exposed Dozzle (Docker log viewer)
MONITOR_PORT_DBM=8082 # host-side port to exposed OCR-D Database Management (Mongo Express)
MONITOR_DB_ROOT_USER=root # root user of OCR-D database
MONITOR_DB_ROOT_PASSWORD=root_password # root password of OCR-D database

# Controller SSH server (with-ocrd-controller)
CONTROLLER_BASE_VERSION=maximum-cuda # tag of ocrd/all from stage version
CONTROLLER_BASE_VERSION=2024-03-08 # tag of ocrd/all from stage version
CONTROLLER_IMAGE=ghcr.io/slub/ocrd_controller:latest # name and tag of image
CONTROLLER_HOST=ocrd-controller # name/address of server (for Manager/Monitor)
CONTROLLER_PORT_SSH=22 # SSH port (for Manager/Monitor)
Expand All @@ -37,8 +40,8 @@ CONTROLLER_WORKERS=1 # number of workers for processing
# Application Kitodo.Production (with-kitodo-production)
APP_IMAGE=ghcr.io/slub/ocrd_kitodo/kitodo_production_ocrd:latest # name and tag of image
APP_BUILD_CONTEXT=${PWD}/_modules/kitodo-production-docker/ # directory of Dockerfile
APP_BUILDER_GIT_REF=ocrd-main # branch "ocrd-main" of git repository (cause using `git` as `BUILDER_TYPE`)
APP_BUILDER_GIT_REPOSITORY=markusweigelt/kitodo-production # repository of `BUILDER_GIT_COMMIT` (cause using `git` as `BUILDER_TYPE`)
APP_BUILDER_GIT_REF=master # branch "ocrd-main" of git repository (cause using `git` as `BUILDER_TYPE`)
APP_BUILDER_GIT_REPOSITORY=kitodo/kitodo-production # repository of `BUILDER_GIT_COMMIT` (cause using `git` as `BUILDER_TYPE`)
APP_DATA=${PWD}/kitodo/data # persistent volume of application data to mount, e.g. config and modules
APP_KEY=${PWD}/kitodo/.ssh/id_rsa # file path with private SSH key of `ocrd` user (should match one of `MANAGER_KEYS`)
APP_PORT=8080 # host-side port of Kitodo.Production
Expand All @@ -63,4 +66,3 @@ ES_NODE_PORT=9300 # host-side port to inter-node protocol
MQ_IMAGE=ghcr.io/slub/kitodo-production-activemq:latest # name and tag of image
MQ_HOST=kitodo-mq # name/address of server (for Kitodo/Manager)
MQ_PORT=61616 # host-side port to exposed TCP Transport
MQ_CLIENT_QUEUE=TaskActionQueue
2 changes: 1 addition & 1 deletion .github/workflows/publish-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.8'
- name: Build environment variable markdown files
run: ./.github/scripts/build-env-mds.sh
shell: bash
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release-stable-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ on:
workflow_dispatch:
inputs:
ocrd-all-version:
description: Stable tag of ocrd/all from stage
description: Stable tag of ocrd/all from stage for OCR-D Controller
required: true
ocrd-core-version:
description: Stable tag of ocrd/core from stage for OCR-D Manager
required: true

jobs:
build-pr:
Expand All @@ -33,6 +36,7 @@ jobs:
# Update .env
sed -i 's|CONTROLLER_BASE_VERSION=maximum-cuda|CONTROLLER_BASE_VERSION=${{ github.event.inputs.ocrd-all-version }}|g' .env
sed -i 's|CONTROLLER_IMAGE=ghcr.io/slub/ocrd_controller:latest|CONTROLLER_IMAGE=ghcr.io/slub/ocrd_controller:stable|g' .env
sed -i 's|MANAGER_BASE_VERSION=latest|MANAGER_BASE_VERSION=${{ github.event.inputs.ocrd-core-version }}|g' .env
sed -i 's|MANAGER_IMAGE=ghcr.io/slub/ocrd_manager:latest|MANAGER_IMAGE=ghcr.io/slub/ocrd_manager:stable|g' .env
sed -i 's|MONITOR_IMAGE=ghcr.io/slub/ocrd_monitor:latest|MONITOR_IMAGE=ghcr.io/slub/ocrd_monitor:stable|g' .env
shell: bash
Expand All @@ -47,6 +51,7 @@ jobs:
- Update CHANGELOG.md
- Update .env
- Replace `CONTROLLER_BASE_VERSION` with `${{ github.event.inputs.ocrd-all-version }}`
- Replace `MANAGER_BASE_VERSION` with `${{ github.event.inputs.ocrd-core-version }}`
- Replace `latest` with `stable`

## Manual steps to provide new release ${{ env.release_version }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
pull_request:
branches:
- main
- stable

# Allows you to run this workflow manually
workflow_dispatch:
Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
sudo systemctl restart docker

- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -52,6 +53,20 @@ jobs:
- name: Start
run: make start

- name: Status
run: |
make status | grep ocrd-database
make status | grep ocrd-manager
make status | grep ocrd-monitor
make status | grep ocrd-logview
make status | grep ocrd-database
make status | grep ocrd-database-management
make status | grep ocrd-controller
make status | grep kitodo-app
make status | grep kitodo-db
make status | grep kitodo-es
make status | grep kitodo-mq

- name: Test
run: make test

Expand All @@ -60,8 +75,25 @@ jobs:

- name: Test parallel using multiple workers
run: CONTROLLER_WORKERS=3 make -j test

- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: './docker-logs'

- name: Tar docker logs on failure
if: failure()
run: tar cvzf ./docker-logs.tgz ./docker-logs

- name: Setup upterm session when failure
- name: Upload docker logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: docker-logs.tgz
path: ./docker-logs.tgz

- name: Setup upterm session on failure
if: ${{ failure() && github.event_name == 'workflow_dispatch' }}
uses: lhotari/action-upterm@v1

Expand Down Expand Up @@ -92,7 +124,7 @@ jobs:
sudo systemctl restart docker

- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -127,7 +159,7 @@ jobs:
- name: Dispatch OCR-D Manager workflow and waiting for completion
uses: aurelien-baudet/workflow-dispatch@v2
with:
inputs: '{ "checkout-ref": "${{ env.MANAGER_CHECKOUT_REF }}", "image-tag": "${{ env.MANAGER_IMAGE_TAG }}" }'
inputs: '{ "checkout-ref": "${{ env.MANAGER_CHECKOUT_REF }}", "image-tag": "${{ env.MANAGER_IMAGE_TAG }}", "ocrd-core-version": "${{ steps.dotenv.outputs.MANAGER_BASE_VERSION }}" }'
ref: 'main'
repo: slub/ocrd_manager
token: ${{ secrets.SUB_REPO_TOKEN }}
Expand All @@ -149,13 +181,30 @@ jobs:
run: make start

- name: Test
run: make test
run: make test

- name: Clean testdata
run: make clean-testdata

- name: Test parallel using multiple workers
run: CONTROLLER_WORKERS=3 make -j test

- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: './docker-logs'

- name: Tar docker logs on failure
if: failure()
run: tar cvzf ./docker-logs.tgz ./docker-logs

- name: Upload docker logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: docker-logs.tgz
path: ./docker-logs.tgz

- name: Setup upterm session when failure
if: ${{ failure() && github.event_name == 'workflow_dispatch' }}
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 SLUB/ocrd_kitodo contributors (https://github.com/slub/ocrd_kitodo/graphs/contributors)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,17 @@ $(CONTROLLER_MODELS)/ocrd-resources/ocrd-tesserocr-recognize/frak2021.traineddat
wget -O $@ https://ub-backup.bib.uni-mannheim.de/~stweil/tesstrain/frak2021/tessdata_best/frak2021-0.905.traineddata

build:
docker compose build
docker compose build $(SERVICES) --no-cache

rebuild:
docker compose stop $(SERVICES)
docker compose up -d --build $(SERVICES)

start:
docker compose up -d

down:
docker compose down
docker compose down -v

stop:
docker compose stop
Expand Down Expand Up @@ -177,8 +181,9 @@ test-kitodo: $(APP_DATA)/metadata/testdata-kitodo
rm -rf $(APP_DATA)/metadata/testdata-kitodo/ocr
# wait until Kitodo.Production directory structure is initialized
docker exec -t $(APP_CONTAINER) bash -c "/wait-for-it.sh -t 0 kitodo-app:$$APP_PORT"
docker exec -t $(APP_CONTAINER) bash -c "/wait-for-it.sh -t 0 ocrd-database:27017"
# run asynchronous ocr processing, which should return within 5 seconds with exit status 1
timeout --preserve-status 5 docker exec -t $(APP_CONTAINER) bash -c '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id "testdata-kitodo" --task-id 1'; test $$? = 1
timeout --preserve-status 5 docker exec $(APP_CONTAINER) bash -c '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id "testdata-kitodo" --task-id 1'; test $$? = 1
# check with interval of 1 second if ocr folder exists. It fails if the ocr folder is not created within 5 minutes.
timeout 10m bash -c 'until test -s $(APP_DATA)/metadata/testdata-kitodo/ocr/alto/00000014.tif.original.xml; do sleep 5; done'
# rest if the alto directory and file exist
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![continuous integration](https://github.com/slub/ocrd_kitodo/actions/workflows/makefile-ci.yml/badge.svg)](https://github.com/slub/ocrd_kitodo/actions/workflows/makefile-ci.yml)
[![documentation published](https://github.com/slub/ocrd_kitodo/actions/workflows/publish-documentation.yml/badge.svg)](https://github.com/slub/ocrd_kitodo/actions/workflows/publish-documentation.yml)

# Integration of OCR-D and Kitodo
## Integration of OCR-D and Kitodo

> Docker integration of [Kitodo.Production](https://github.com/kitodo/kitodo-production) and [OCR-D](https://ocr-d.de)

Expand All @@ -10,3 +10,10 @@
![interfaces](https://user-images.githubusercontent.com/38561704/204881734-ab452c92-6519-4902-abc1-d405fee9a843.png)

View full documentation [here](https://slub.github.io/ocrd_kitodo/).

## Maintainers

If you have any questions or encounter any problems, please do not hesitate to contact us.

- [Robert Sachunsky](https://github.com/bertsky)
- [Markus Weigelt](https://github.com/markusweigelt)
2 changes: 1 addition & 1 deletion _modules/ocrd_controller
36 changes: 16 additions & 20 deletions _resources/kitodo-sample/sql/kitodo_post_init.sql
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
INSERT INTO `ocrprofile` (`id`, `title`, `file`, `client_id`) VALUES
(1, 'OCR Workflow Example', '/workflows/ocr-workflow-default.sh', 1);

INSERT INTO `ruleset` (`id`, `title`, `file`, `orderMetadataByRuleset`, `indexAction`, `active`, `client_id`) VALUES
(4, 'Ruleset', 'ruleset_default.xml', 0, 'INDEX', 1, 1);

INSERT INTO `workflow` (`id`, `title`, `status`, `indexAction`, `client_id`, `separateStructure`) VALUES
(2, 'OCR_Workflow', 'ACTIVE', 'INDEX', 1, 0);

INSERT INTO `template` (`id`, `title`, `creationDate`, `sortHelperStatus`, `ruleset_id`, `docket_id`, `indexAction`, `workflow_id`, `active`, `client_id`, `ocr_profile_id`) VALUES
(1, 'Example Template', '2021-11-22 17:52:48', NULL, 4, 1, 'INDEX', 1, 1, 1, 1),
(2, 'Template_OCR', '2022-03-10 16:42:15', NULL, 4, 1, 'INDEX', 2, 1, 1, 1);
INSERT INTO `template` (`id`, `title`, `creationDate`, `sortHelperStatus`, `ruleset_id`, `docket_id`, `indexAction`, `workflow_id`, `active`, `client_id`, `ocrd_workflow_id` ) VALUES
(1, 'Example Template', '2021-11-22 17:52:48', NULL, 4, 1, 'INDEX', 1, 1, 1, NULL),
(2, 'Template_OCR', '2022-03-10 16:42:15', NULL, 4, 1, 'INDEX', 2, 1, 1, 'ocr-workflow-default.sh');

INSERT INTO `process` (`id`, `title`, `inChoiceListShown`, `sortHelperStatus`, `sortHelperImages`, `sortHelperArticles`, `sortHelperDocstructs`, `sortHelperMetadata`, `creationDate`, `wikiField`, `project_id`, `ruleset_id`, `docket_id`, `indexAction`, `processBaseUri`, `template_id`, `parent_id`, `ordering`, `exported`) VALUES
(3, 'CaelCaFeD_1761630636', 0, '060020000020', 0, 0, 0, 0, '2022-03-10 16:43:28', '', 1, 4, 1, 'INDEX', '3/', 2, NULL, NULL, 0);
Expand Down Expand Up @@ -43,13 +40,13 @@ INSERT INTO `task` (`id`, `title`, `ordering`, `processingStatus`, `editType`, `
(8, 'Export DMS', 4, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 1, NULL, 'Task_4', 0, 1, 0, 0, 0, 0),
(18, 'Scanning', 1, 1, 4, '2022-03-10 16:42:51', NULL, NULL, 0, 0, 0, 1, 1, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_1', 0, 0, 0, 0, 0, 0),
(19, 'QC', 2, 0, 0, NULL, NULL, NULL, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_2', 0, 0, 0, 0, 0, 0),
(20, 'OCR from Process Dir', 3, 0, 0, NULL, NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --workflow {ocrprofilefile} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0),
(20, 'OCR from Process Dir', 3, 0, 0, NULL, NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --workflow {ocrdworkflowid} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0),
(21, 'Structure and Metadata', 4, 0, 0, NULL, NULL, NULL, 0, 1, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_3', 0, 0, 0, 0, 0, 0),
(22, 'Export DMS', 5, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Task_4', 0, 0, 0, 0, 0, 0),
(23, 'OCR from Export Dir', 6, 0, 0, NULL, NULL, NULL, 0, 0, 1, 0, 0, 0, 0, 'OCR Export Dir', '/usr/local/kitodo/scripts/script_ocr_export_dir.sh {processtitle} {stepid}', 0, 0, NULL, NULL, 'INDEX', 2, NULL, 'Activity_12zha6z', 0, 1, 0, 0, 0, 0),
(24, 'Scanning', 1, 3, 3, NOW(), NULL, NULL, 0, 0, 0, 1, 1, 0, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_1', 0, 0, 0, 0, 0, 0),
(25, 'QC', 2, 3, 3, NOW(), NULL, NULL, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_2', 0, 0, 0, 0, 0, 0),
(26, 'OCR from Process Dir', 3, 1, 3, NOW(), NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --workflow {ocrprofilefile} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0),
(26, 'OCR from Process Dir', 3, 1, 3, NOW(), NULL, NULL, 0, 1, 0, 0, 0, 0, 0, 'OCR Process Dir', '/usr/local/kitodo/scripts/script_ocr_process_dir.sh --proc-id {processid} --task-id {stepid} --workflow {ocrdworkflowid} --lang $(meta.topstruct.DocLanguage) --script $(meta.topstruct.slub_script)', 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Activity_0y2ldc1', 0, 0, 0, 0, 0, 0),
(27, 'Structure and Metadata', 4, 0, 3, NOW(), NULL, NULL, 0, 1, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_3', 0, 0, 0, 0, 0, 0),
(28, 'Export DMS', 5, 0, 3, NOW(), NULL, NULL, 0, 0, 0, 0, 0, 1, 0, NULL, NULL, 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Task_4', 0, 0, 0, 0, 0, 0),
(29, 'OCR from Export Dir', 6, 0, 3, NOW(), NULL, NULL, 0, 0, 1, 0, 0, 0, 0, 'OCR Export Dir', '/usr/local/kitodo/scripts/script_ocr_export_dir.sh {processtitle} {stepid}', 0, 0, NULL, 3, 'INDEX', NULL, NULL, 'Activity_12zha6z', 0, 1, 0, 0, 0, 0);
Expand Down Expand Up @@ -166,17 +163,16 @@ INSERT INTO `role_x_authority` (`role_id`, `authority_id`) VALUES
(1, 189),
(1, 190),
(1, 191),
(1, 192),
(1, 193),
(1, 194),
(1, 195),
(1, 196),
(1, 197),
(1, 198),
(1, 199),
(1, 200),
(1, 201),
(1, 202);
(1, 192),
(1, 193),
(1, 194),
(1, 195),
(1, 196),
(1, 197),
(1, 198),
(1, 199),
(1, 200),
(1, 201);

INSERT INTO `task_x_role` (`role_id`, `task_id`) VALUES
(1, 5),
Expand Down Expand Up @@ -228,4 +224,4 @@ INSERT INTO `workpiece_x_property` (`process_id`, `property_id`) VALUES
(3, 39),
(3, 40);

UPDATE project SET dmsImportRootPath = '/usr/local/kitodo/dms-export/' WHERE id = 1;
UPDATE project SET dmsImportRootPath = '/usr/local/kitodo/export/' WHERE id = 1;
8 changes: 4 additions & 4 deletions _resources/kitodo/before_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ if [ -n "$OCRD_MANAGER" ]; then
ssh-keyscan -H -p ${OCRD_MANAGER_PORT:-22} $OCRD_MANAGER_HOST,$OCRD_MANAGER_IP >>/etc/ssh/ssh_known_hosts
fi

# link OCR-D Manager workflow into OCR profiles folder
if [ ! -d "/tmp/kitodo/overwrites/data/ocr/profiles" ]; then
mkdir -p /tmp/kitodo/overwrites/data/ocr/profiles/
# link OCR-D Manager workflow into OCR-D workflows directory
if [ ! -d "/tmp/kitodo/overwrites/data/ocrd_workflows" ]; then
mkdir -p /usr/local/ocrd-manager/workflows/

ln -s /usr/local/ocrd-manager/workflows /tmp/kitodo/overwrites/data/ocr/profiles/workflows
ln -s /usr/local/ocrd-manager/workflows/ /tmp/kitodo/overwrites/data/
mv /tmp/kitodo/overwrites/data/workflows /tmp/kitodo/overwrites/data/ocrd_workflows
fi
3 changes: 3 additions & 0 deletions _resources/kitodo/data/scripts/script_ocr_process_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ if test -n "$WORKFLOW"; then
COMMAND+=" --workflow $WORKFLOW"
fi

if test -n "$MQ_HOST" -a -n "$MQ_PORT"; then
COMMAND+=" --activemq-url tcp://$MQ_HOST:$MQ_PORT?closeAsync=false --activemq-queue TaskActionQueue --async"
fi

COMMAND+=" /data/$PROCESS_ID"

Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ services:
depends_on:
- ocrd-controller
- ocrd-database
build:
args:
VERSION: ${MANAGER_BASE_VERSION}

ocrd-monitor:
extends:
file: _modules/ocrd_monitor/docker-compose.yml
service: ocrd-monitor
depends_on:
- ocrd-controller
- ocrd-database

ocrd-logview:
Expand Down Expand Up @@ -44,7 +46,6 @@ services:
service: ocrd-controller
profiles:
- with-ocrd-controller

build:
args:
VERSION: ${CONTROLLER_BASE_VERSION}
Expand Down
Loading