{"id":21660199,"url":"https://github.com/slub/kitodo-production-docker","last_synced_at":"2025-04-11T22:41:16.125Z","repository":{"id":37801096,"uuid":"478027273","full_name":"slub/kitodo-production-docker","owner":"slub","description":"Kitodo.Production Docker","archived":false,"fork":false,"pushed_at":"2023-10-02T12:46:34.000Z","size":284,"stargazers_count":4,"open_issues_count":6,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-25T18:41:15.789Z","etag":null,"topics":["docker","docker-compose"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-05T07:52:47.000Z","updated_at":"2024-08-22T19:13:34.000Z","dependencies_parsed_at":"2024-11-25T09:43:10.294Z","dependency_job_id":null,"html_url":"https://github.com/slub/kitodo-production-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slub%2Fkitodo-production-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slub%2Fkitodo-production-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slub%2Fkitodo-production-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slub%2Fkitodo-production-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slub","download_url":"https://codeload.github.com/slub/kitodo-production-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493022,"owners_count":21113159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose"],"created_at":"2024-11-25T09:32:29.289Z","updated_at":"2025-04-11T22:41:16.099Z","avatar_url":"https://github.com/slub.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kitodo.Production Docker\n\n * [Prerequisites](#prerequisites)\n * [Quickstart](#quickstart)\n * [Services](#services)\n   * [Environment file](#environment-file) \n   * [Compose overwrites](#compose-overwrites) \n   * [Hooks to extend and overwrite app data](#hooks-to-extend-and-overwrite-app-data) \n * [Structure](#usage)\n   * [Single compose project](#single-compose-project)\n   * [Multi compose project](#multi-compose-project)\n * [Makefile](#makefile)\n * [Further information](#further-information)\n\n\nThe Kitodo.Production can be started quickly with the provided Docker image. However, a MySQL/MariaDB database and ElasticSearch are required to start the application. Additionally, a Docker Compose file is available for a faster setup.\n\n## Prerequisites\n\nInstall Docker Engine\nhttps://docs.docker.com/get-docker/\n\nInstall Docker Compose\nhttps://docs.docker.com/compose/install/\n\n## Quickstart \n\nGo to the directory where you've put `docker-compose.yml`.\n\nCopy the environment file `.env.example` inside the directory and rename it to `.env`. \n\nBuild and start all service containers\n```\ndocker compose up -d --build\n```\n\nStops all service containers\n```\ndocker compose stop\n```\n\nStops and remove all service containers\n```\ndocker compose down\n```\n\n## Services\n\nWhen running `docker compose up` all services Kitodo.Production (APP), Database (DB), Elastic Search (ES) and Active MQ (MQ) in our `docker-compose.yml` will be started and each as separate Docker container.\n\n### Environment file\n\nTo configure our services copy the environment file `.env.example` inside the directory and rename it to `.env`. Adjust the configuration of the respective service to suit your needs. The variables are marked with the prefix of the service e.g. `APP_` for our Kitodo.Production Application.\n\n### Compose overwrites\n\nIn the folder overwrites are configurations to overwrite our default Kitodo.Production configuration of `docker-compose.yml`. \n\nFor example to build image with specific Git branch and run Tomcat in debug mode use following Docker Compose command with parameters.\n\n```\ndocker compose -f docker-compose.yml -f ./overwrites/docker-compose-app-builder-git.yml -f ./overwrites/docker-compose-app-debug.yml up -d --build\n```\n\n#### Builder\n\nThe builder defines the source to get the resources to create the image. The builder provides a preset to customize the appropriate builder using the `.env` file.\n\nYou can only overwrite the default `docker-compose.yml` with one of these builder overwrites.\n\n##### Release\n\nRelease files of any [release of Kitodo.Production](https://github.com/kitodo/kitodo-production/releases) will be used to build Kitodo.Production image.\n\nThe variables of the Release Builder can be found in the `.env` file with the prefix `APP_BUILDER_RELEASE_`.\n\n```\ndocker compose -f docker-compose.yml -f ./overwrites/docker-compose-app-builder-release.yml up -d --build\n```\n\n##### Git\n\nArchive with specified commit / branch and source url will be downloaded. Furthermore, builder triggers maven to build sources, creates database using temporary database and migrate database using flyway migration steps.\n\nThe variables of the Git Builder can be found in the `.env` file with the prefix `APP_BUILDER_GIT_`.\n\n```\ndocker compose -f docker-compose.yml -f ./overwrites/docker-compose-app-builder-git.yml up -d --build\n```\n\n##### Local\n\nLocal WAR, SQL and ZIP files will be used to build Kitodo.Production image.\n\nThe variables of the Local Builder can be found in the `.env` file with the prefix `APP_BUILDER_LOCAL_`.\n\n```\ndocker compose -f docker-compose.yml -f ./overwrites/docker-compose-app-builder-local.yml up -d --build\n```\n\n#### Debug\n\nThis configures tomcat to run in debug mode after building and when starting container.\n\nThe variables of the debug overwrite file can be found in the `.env` file with the prefix `APP_DEBUG_`.\n\n```\ndocker compose -f docker-compose.yml -f ./overwrites/docker-compose-app-debug.yml up -d\n```\n\n#### Dev\n\nThis overwrites WAR file and bind local one at runtime. \n\n```\ndocker compose -f docker-compose.yml -f ./overwrites/docker-compose-app-dev.yml up -d\n```\n\nIf you go into the container (with `docker exec -it CONTAINERNAME bash`) the tomcat can be restarted with the new application using the command `/deploy.sh`.\n\n#### Log Viewer \n\nThe logs of the respective container can be accessed via the following command:\n\n```\ndocker logs CONTAINER\n```\n\nIt is more convenient to use the log viewer service \"Dozzle\" with the following overwrite: \n\n```\ndocker compose -f docker-compose.yml -f ./overwrites/docker-compose-logviewer.yml up -d\n```\n\n*You can reach the Log Viewer under http `localhost:8088`.*\n\n#### File Browser \n\nFile Browser provides a file managing interface for Kitodo.Production config and data directories. It can be used to upload, delete, preview, rename and edit files of these directories.\n\n```\ndocker compose -f docker-compose.yml -f ./overwrites/docker-compose-filebrowser.yml up -d\n```\n\n*You can reach the File Browser under http `localhost:8090`. Currently the default login with username `admin` and password `admin` is used.*\n\n### Hooks to extend and overwrite app data\n\nThere are some hooks available to modify and extend default data when running Kitodo.Production container for the first time. \n\n#### Modify container before startup\n\nThis hook runs before startup.sh is executed. For example, you can add some SSH configuration here.\n\n```\n      - type: bind\n        source: ...\n        target: /usr/bin/before_startup.sh\n```\n\n#### Modify data directory\n\nAll files and subdirectories of directory bind to `/tmp/kitodo/overwrites/data` are copied to the `/usr/local/kitodo` folder. For example, you can overwrite default ruleset files or add your custom ruleset files to ruleset folder.\n\n```\n      - type: bind\n        source: ...\n        target: /tmp/kitodo/overwrites/data\n```\n\nUnder `/overwrites/app` we implemented these mechanism, so you can add the files and directories to modify your project. This hook is especially helpful when you want to a first basic configuration for your [multi compose project](#multi-compose-project).\n\n#### Modify config directory\n\nAll files and subdirectories of directory bind to `/tmp/kitodo/overwrites/config` are copied to the `/usr/local/tomcat/webapps/kitodo/WEB-INF/classes` folder. For example, you can overwrite default `kitodo_config.properties`, add your log4j2 config to `log4j2.xml` or add file formats with adjusting `kitodo_fileFormats.xml`. \n\n```\n      - type: bind\n        source: ...\n        target: /tmp/kitodo/overwrites/config\n```\n\n#### Modify database after initialisation\n\nThis hook runs after database is initialized. For example, you can add import configurations for your custom catalogues or example data for development purposes to database.\n\n```\n      - type: bind\n        source: ...\n        target: /tmp/kitodo/overwrites/sql/post_init.sql\n```\n\n## Structure\n\nThere are two several ways to structure the Compose Project.\n\n### Single compose project\n\nIf only one project instance is needed or repository is used e.g. as submodule in other projects.\n\nBuild image before and start the container of image\n```\ndocker compose up -d --build\n```\n\nStops the container\n```\ndocker compose stop\n```\n\nStops and remove the container\n```\ndocker compose down\n```\n\n### Multi compose project\n\nWhen different projects are needed e.g. to do a review without breaking the existing environment for the current projects of a customer and a feature.\n\nGo to the directory where you've put docker-compose.yml. Create subdirectory where you want to store your compose projects.\nIn our examples we named it \"projects\". Create project directory (e.g. my-compose-project) in subdirectory where you want to store your compose project data.\n\n#### Project specific Docker Compose file\n\nAdd compose file with name `docker-compose.yml` to your project directory and maybe add this as config file to overwrite them all with your project specific settings.\n\n```\ndocker compose ... -f ./projects/my-compose-project/docker-compose.yml \n```\n\nWhen using our [Make](#makefile) the compose file is added automatically as last file to `COMPOSE_FILE` variable of Makefile so it overwrites existing configs.\n\n#### Project specific environment file\n\nCopy the `.env.example` to project directory, rename file to `.env` and change value of `COMPOSE_PROJECT_NAME` env to the name of project directory and comment out the single compose project variables and uncomment the multiple compose project variables\n\n```\ndocker compose --env-file ./projects/my-compose-project/.env ... # ... means command e.g. up -d --build\n```\n\n#### General enviroment file (same config for projects)\n\nCopy `.env.example`, rename file to `.env`, uncomment `COMPOSE_PROJECT_NAME` and comment out the single compose project variables and uncomment the multiple compose project variables\n\n```\ndocker compose -p my-compose-project ... # ... means command e.g. up -d --build\n```\n\n## Makefile\n\nTo facilitate the use of Docker Compose, the Makefile can be used. It takes care of the creation of the project folder and provides various targets to manage the Compose project.\n\nFor more information use the following command:\n\n```\nmake help\n```\n\n## Further information\n\n[Workflow to build and run Kitodo.Production over ngrok](https://github.com/slub/kitodo-production-docker/wiki/Workflow-to-build-and-run-Kitodo.Production-over-ngrok)\n\n## Maintainer\n\nIf you have any questions or encounter any problems, please do not hesitate to contact me.\n\n- [Markus Weigelt](https://github.com/markusweigelt)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslub%2Fkitodo-production-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslub%2Fkitodo-production-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslub%2Fkitodo-production-docker/lists"}