From 6a17958e7bb5536e748b797b9de09795a085ee26 Mon Sep 17 00:00:00 2001 From: harmj0y Date: Fri, 14 Nov 2025 09:40:21 -0800 Subject: [PATCH] Enable/Disable Tika OCR via ENV variable - Enable/Disable Tika OCR via ENV variable --- compose.yaml | 2 +- docs/enrichment_configuration.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index 41c6854..db250b3 100644 --- a/compose.yaml +++ b/compose.yaml @@ -536,7 +536,7 @@ services: document-conversion: image: ghcr.io/specterops/nemesis/document-conversion:latest volumes: - - ./infra/tika/tika-config.xml:/tika-config.xml:ro + - ./infra/tika/tika-config${TIKA_USE_OCR:+-tesseract}.xml:/tika-config.xml:ro environment: - APP_ID=document-conversion - DAPR_GRPC_PORT=50002 diff --git a/docs/enrichment_configuration.md b/docs/enrichment_configuration.md index 1cd0bd3..b19af4f 100644 --- a/docs/enrichment_configuration.md +++ b/docs/enrichment_configuration.md @@ -34,6 +34,7 @@ The [Document Conversion service](https://github.com/SpecterOps/Nemesis/tree/mai | ----------------------------- | ------------- | --------------------------------------------------------------- | | `MAX_PARALLEL_WORKFLOWS` | 5 | Maxmimum number of parallel conversion workflows allows | | `MAX_WORKFLOW_EXECUTION_TIME` | 300 | Maximum time (in seconds) workflows can run before being killed | +| `TIKA_USE_OCR` | false | Set to `true` to enable OCR support via Tessaract | | `TIKA_OCR_LANGUAGES` | eng | Tika/Tesseract OCR languages supported. | If you want to have additional language packs supported (see https://github.com/tesseract-ocr/tessdata for a full list), run something like this before launching Nemesis or set the value in your .env : @@ -42,6 +43,8 @@ If you want to have additional language packs supported (see https://github.com/ export TIKA_OCR_LANGUAGES="eng chi_sim chi_tra jpn rus deu spa" ``` +**NOTE:** due to Docker's ENV variable substitution, setting `TIKA_USE_OCR=false` will be interpreted as true - either removing `TIKA_USE_OCR` from an .env file or setting `TIKA_USE_OCR=""` will disable OCR (the default). + ## Nosey Parker ### ENV Variables