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

changes for improved kitodo docker compose #23

Merged
merged 46 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
64f599e
changes for improved kitodo docker compose
markusweigelt Jun 8, 2022
54195a1
Merge branch 'main' into changes_for_kitodo
markusweigelt Jun 13, 2022
ddbd0a9
split implicit stop rules
bertsky Jun 13, 2022
42cb02f
changes for improved kitodo docker compose
markusweigelt Jun 8, 2022
6f2721d
improvements of kitodo-app and -builder to use with make files
markusweigelt Jun 13, 2022
fc5ba37
Merge branch 'changes_for_kitodo' of github.com:markusweigelt/kitodo_…
markusweigelt Jun 13, 2022
1ac829b
improve makefile and fix path problems using BUILDER_BUILD_RESOURCES
markusweigelt Jun 14, 2022
62d9682
remove symlink and add file again
markusweigelt Jun 14, 2022
b12b1d8
add kitodo app file
markusweigelt Jun 14, 2022
d3fe2ae
change builder path variable
markusweigelt Jun 14, 2022
1670698
use active mq config of submodule repository
markusweigelt Jun 14, 2022
c2c5a1d
simplify 'build' rules and COMPOSE_FILE def
bertsky Jun 14, 2022
a45f8be
example resources only contains diff to generate resources of kitodo …
markusweigelt Jun 16, 2022
fa47b14
revert . to PWD as relative basedir for volumes in .env
bertsky Jun 16, 2022
1050f8c
update submodule
markusweigelt Jun 16, 2022
b3872d3
Merge branch 'changes_for_kitodo' of github.com:markusweigelt/kitodo_…
markusweigelt Jun 16, 2022
9c9a227
submodule to head of kitodo-production-docker
markusweigelt Jun 17, 2022
97792fa
updata resources and ignore unzipped data directory
markusweigelt Jun 17, 2022
5aa4672
update manager module
markusweigelt Jun 17, 2022
9458dd6
revert more . to PWD (finish fa47b14bd)
bertsky Jun 17, 2022
f2b8e2b
update submodule
markusweigelt Jun 17, 2022
7c1eb51
Merge branch 'changes_for_kitodo' of github.com:markusweigelt/kitodo_…
markusweigelt Jun 17, 2022
3d2ef95
update submodule
markusweigelt Jun 17, 2022
e4b15a6
changed scripts/script_ocr.sh
markusweigelt Jun 22, 2022
7e63457
change unzip data to /data/data
markusweigelt Jun 22, 2022
2692e9c
make build-kitodo: run in fg, avoid orphans
bertsky Jun 23, 2022
5ab9615
Kitodo builder: use absolute path for Docker context
bertsky Jun 23, 2022
13f48dc
Merge branch 'changes_for_kitodo' of https://github.com/markusweigelt…
bertsky Jun 23, 2022
711b134
add docker-compose down of kitodo builder
markusweigelt Jun 23, 2022
a25fb32
Merge branch 'changes_for_kitodo' of github.com:markusweigelt/kitodo_…
markusweigelt Jun 23, 2022
4087886
update submodule
markusweigelt Jun 23, 2022
9d320e4
update submodule
markusweigelt Jun 23, 2022
fd90bc8
update submodule
markusweigelt Jun 23, 2022
0613d8b
improve documentation
markusweigelt Jun 23, 2022
1ba466a
revert changes to .env in 0613d8b55
bertsky Jun 23, 2022
1b810b8
remove unused env variables
markusweigelt Jun 24, 2022
2e6fcdb
submodule update
markusweigelt Jun 24, 2022
5449356
consider .env.local if exist
markusweigelt Jun 24, 2022
183fe11
formatting -> remove tabs
markusweigelt Jun 24, 2022
5caf177
update submodule
markusweigelt Jun 24, 2022
90947f9
update submodule
markusweigelt Jun 24, 2022
8b19c98
add env file parameter to docker-compose of build target
markusweigelt Jun 24, 2022
f6aa987
add env variable and update submodule
markusweigelt Jun 24, 2022
9eab6fc
update resource data zip and submodule
markusweigelt Jun 24, 2022
8f90aff
remove handling of .env.local and --env-file parameter of docker-comp…
markusweigelt Jun 24, 2022
2bd8fcb
submodule update
markusweigelt Jun 24, 2022
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
25 changes: 13 additions & 12 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ CONTROLLER_ENV_UID=1001
CONTROLLER_ENV_GID=1001
CONTROLLER_ENV_UMASK=0002
CONTROLLER_PORT_SSH=8022
CONTROLLER_KEYS=${PWD}/ocrd/controller/.ssh/authorized_keys
CONTROLLER_DATA=${PWD}/kitodo/data/metadata
CONTROLLER_MODELS=${PWD}/ocrd/controller/models
CONTROLLER_CONFIG=${PWD}/ocrd/controller/config
CONTROLLER_KEYS=./ocrd/controller/.ssh/authorized_keys
CONTROLLER_DATA=./kitodo/data/metadata
CONTROLLER_MODELS=./ocrd/controller/models
CONTROLLER_CONFIG=./ocrd/controller/config
CONTROLLER_WORKERS=1

MONITOR_IMAGE=bertsky/ocrd_monitor
MONITOR_HOST=ocrd-monitor
MONITOR_PORT_WEB=5000
MONITOR_PORT_GTK=8085
MONITOR_DATA=${PWD}/kitodo/data/metadata
MONITOR_DATA=./kitodo/data/metadata

MANAGER_IMAGE=markusweigelt/ocrd_manager
MANAGER_IMAGE_TAG=latest
Expand All @@ -25,20 +25,21 @@ MANAGER_ENV_UID=1001
MANAGER_ENV_GID=1001
MANAGER_ENV_UMASK=0002
MANAGER_PORT_SSH=9022
MANAGER_KEYS=${PWD}/ocrd/manager/.ssh/authorized_keys
MANAGER_KEY=${PWD}/ocrd/manager/.ssh/id_rsa
MANAGER_DATA=${PWD}/kitodo/data/metadata
MANAGER_KEYS=./ocrd/manager/.ssh/authorized_keys
MANAGER_KEY=./ocrd/manager/.ssh/id_rsa
MANAGER_DATA=./kitodo/data/metadata

# Builder Kitodo.Production
BUILDER_TYPE=GIT
BUILDER_GIT_COMMIT=ocrd-main
BUILDER_GIT_SOURCE_URL=https://github.com/markusweigelt/kitodo-production/
BUILDER_BUILD_RESOURCES=./_modules/kitodo-production-docker/kitodo/build-resources

# Application Kitodo.Production
APP_BUILD_CONTEXT=${PWD}/_modules/kitodo-production-docker/kitodo
APP_BUILD_RESOURCES=${APP_BUILD_CONTEXT}/build-resources
APP_DATA=${PWD}/kitodo/data
APP_KEY=${PWD}/kitodo/.ssh/id_rsa
APP_BUILD_CONTEXT=.
APP_BUILD_RESOURCES=./build-resources
APP_DATA=./kitodo/data
APP_KEY=./kitodo/.ssh/id_rsa
APP_PORT=8080
APP_DEBUG=false
APP_DEBUG_PORT=5005
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/ocrd/*
/kitodo/*
*.iml
19 changes: 7 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,29 @@ ifeq (managed,$(MODE))
COMPOSE_FILES += docker-compose.managed.yml
endif
COMPOSE_FILES += docker-compose.kitodo-app.yml
COMPOSE_FILES += docker-compose.kitodo-app.override.yml
NULL :=
WHITE := $(NULL) $(NULL)
COLON := :
COMPOSE_FILE = $(subst $(WHITE),$(COLON),$(COMPOSE_FILES))
COMPOSE_PATH_SEPARATOR = $(COLON)

.EXPORT_ALL_VARIABLES:

clean:
$(RM) -fr kitodo ocrd

build: ./kitodo
build: ./kitodo
build: ./kitodo/.ssh/id_rsa
build: ./ocrd/manager/.ssh/id_rsa
build: ./ocrd/controller/.ssh/authorized_keys
build: ./ocrd/manager/.ssh/authorized_keys
build:
$(MAKE) -C _modules/kitodo-production-docker build

./kitodo: ./_resources/config_modules.zip

./kitodo: ./_resources/config_modules.zip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still hesitant to completely skip telling make about ./_resources/config_modules.zip – but if its just a provisional state, ok.

unzip $< -d $@
touch -m $@
mkdir -p _modules/kitodo-production-docker/kitodo/build-resources
docker-compose -f ./docker-compose.kitodo-builder.yml up --build

./kitodo/.ssh/: ./kitodo

./ocrd/controller/models/ ./ocrd/controller/config/ ./ocrd/manager/.ssh/ ./kitodo/.ssh/ ./ocrd/controller/.ssh/:
./ocrd/controller/models/ ./ocrd/controller/config/ ./ocrd/manager/.ssh/ ./kitodo ./kitodo/.ssh/ ./ocrd/controller/.ssh/:
mkdir -p $@

./kitodo/.ssh/id_rsa: | ./kitodo/.ssh/
Expand All @@ -56,7 +50,7 @@ build:
cp $<.pub $@

start:
docker-compose up --build -d
docker-compose up -d --build

down:
docker-compose down
Expand Down Expand Up @@ -94,4 +88,5 @@ help: ; @eval "$$HELP"
.PHONY: clean build start down config status help

# do not search for implicit rules here:
%.zip Makefile: ;
%.zip: ;
Makefile: ;
2 changes: 1 addition & 1 deletion _modules/ocrd_manager
38 changes: 0 additions & 38 deletions docker-compose.kitodo-app.yml

This file was deleted.

48 changes: 48 additions & 0 deletions docker-compose.kitodo-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
services:

kitodo-app:
extends:
file: _modules/kitodo-production-docker/kitodo/kitodo-services.yml
service: kitodo-app

environment:
- "OCRD_MANAGER=${MANAGER_HOST}:22"

depends_on:
- kitodo-db
- kitodo-es
- kitodo-mq
- ocrd-manager

volumes:
- type: bind
source: ${APP_KEY}
target: /id_rsa
- type: bind
source: ./_resources/kitodo.sql
target: /tmp/kitodo/kitodo.sql
- ${APP_DATA}:/usr/local/kitodo


kitodo-db:
extends:
file: _modules/kitodo-production-docker/kitodo/kitodo-services.yml
service: kitodo-db


kitodo-es:
extends:
file: _modules/kitodo-production-docker/kitodo/kitodo-services.yml
service: kitodo-es


kitodo-mq:
extends:
file: _modules/kitodo-production-docker/kitodo/kitodo-services.yml
service: kitodo-mq

# TODO add resource to kitodo active mq image
volumes:
- type: bind
source: ./_resources/kitodo-activemq.xml
target: /opt/activemq/conf/activemq.xml
17 changes: 17 additions & 0 deletions docker-compose.kitodo-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
services:

kitodo-builder:
extends:
file: _modules/kitodo-production-docker/kitodo/kitodo-services.yml
service: kitodo-builder

depends_on:
- kitodo-db

volumes:
- ${BUILDER_BUILD_RESOURCES}:/data

kitodo-db:
extends:
file: _modules/kitodo-production-docker/kitodo/kitodo-services.yml
service: kitodo-db