diff --git a/.woodpecker.star b/.woodpecker.star index 6baa8b3b77..556c54d259 100644 --- a/.woodpecker.star +++ b/.woodpecker.star @@ -8,7 +8,7 @@ docker_repo_slug = "opencloudeu/opencloud" # images ALPINE_GIT = "alpine/git:latest" -APACHE_TIKA = "apache/tika:4.0.0-full" +APACHE_TIKA = "apache/tika:4.1.0-full" CHKO_DOCKER_PUSHRM = "chko/docker-pushrm:1" CODACY_COVERAGE_REPORTER = "codacy/codacy-coverage-reporter:14.1.3" COLLABORA_CODE = "collabora/code:24.04.5.1.1" @@ -3447,6 +3447,17 @@ def tikaService(): # tika 4 discovers its plugins relative to the image working directory, # the workspace default would leave the pipes fetchers empty "directory": "/opt/tika-server", + # the thumbnail preset ships inert; the config is what activates it + "entrypoint": [ + "java", + "-cp", + "/opt/tika-server/*:/opt/tika-server/lib/*:/tika-extras/*", + "org.apache.tika.server.core.TikaServerCli", + "-h", + "0.0.0.0", + "-c", + "%s/tests/config/woodpecker/tika-config.json" % dirs["base"], + ], "detach": True, }, { "name": "wait-for-tika-service", diff --git a/devtools/deployments/opencloud_full/config/tika/tika-config.json b/devtools/deployments/opencloud_full/config/tika/tika-config.json new file mode 100644 index 0000000000..5e0ded5f0a --- /dev/null +++ b/devtools/deployments/opencloud_full/config/tika/tika-config.json @@ -0,0 +1,12 @@ +{ + // -h and -p still come from the command line; a config file has to carry the block + "server": { + "port": 9998, + "host": "0.0.0.0" + }, + // the thumbnail preset ships inert in tika-pipes-core; activating it is what serves + // PUT /unpack/preset/thumbnail, which the webdav thumbnailer asks for + "presets": { + "thumbnail": true + } +} diff --git a/devtools/deployments/opencloud_full/tika.yml b/devtools/deployments/opencloud_full/tika.yml index 081f2876b5..faf21e13d5 100644 --- a/devtools/deployments/opencloud_full/tika.yml +++ b/devtools/deployments/opencloud_full/tika.yml @@ -3,6 +3,10 @@ services: tika: image: ${TIKA_IMAGE:-apache/tika:latest-full} # release notes: https://tika.apache.org + # the thumbnail preset ships inert; the config is what activates it + command: ['-c', '/tika-config.json'] + volumes: + - ./config/tika/tika-config.json:/tika-config.json networks: opencloud-net: restart: always @@ -13,5 +17,6 @@ services: environment: # fulltext search SEARCH_EXTRACTOR_TYPE: tika - SEARCH_EXTRACTOR_TIKA_TIKA_URL: http://tika:9998 + # the search extractor and the webdav thumbnailer both read it + OC_TIKA_URL: http://tika:9998 FRONTEND_FULL_TEXT_SEARCH_ENABLED: "true" diff --git a/tests/acceptance/docker/src/tika.yml b/tests/acceptance/docker/src/tika.yml index fe8eff86e8..467001dbcc 100644 --- a/tests/acceptance/docker/src/tika.yml +++ b/tests/acceptance/docker/src/tika.yml @@ -5,4 +5,7 @@ services: - tika command: tika:9998 tika: - image: apache/tika:4.0.0-full + image: apache/tika:4.1.0-full + command: ['-c', '/tika-config.json'] + volumes: + - ../../../config/woodpecker/tika-config.json:/tika-config.json diff --git a/tests/config/woodpecker/tika-config.json b/tests/config/woodpecker/tika-config.json new file mode 100644 index 0000000000..5e0ded5f0a --- /dev/null +++ b/tests/config/woodpecker/tika-config.json @@ -0,0 +1,12 @@ +{ + // -h and -p still come from the command line; a config file has to carry the block + "server": { + "port": 9998, + "host": "0.0.0.0" + }, + // the thumbnail preset ships inert in tika-pipes-core; activating it is what serves + // PUT /unpack/preset/thumbnail, which the webdav thumbnailer asks for + "presets": { + "thumbnail": true + } +}