Add German OCR support to Paperless-ngx

- Created custom Dockerfile extending official paperless-ngx image
- Added tesseract-ocr-deu package for German language OCR
- Set PAPERLESS_OCR_LANGUAGE=deu+eng environment variable
- Updated CI/CD pipeline to build and push custom paperless image
- Modified deployment script to pull paperless image from GHCR
- Tested locally: German (deu) language pack now available alongside English
This commit is contained in:
Stiftung Development
2025-09-21 21:09:58 +02:00
parent 34b30be0a6
commit b8a6e99f07
4 changed files with 40 additions and 7 deletions

View File

@@ -165,7 +165,7 @@ jobs:
type=ref,event=pr
type=sha,prefix={{branch}}-
- name: Build and push Docker image
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: ./app
@@ -173,6 +173,14 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Paperless image
uses: docker/build-push-action@v5
with:
context: ./paperless
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-paperless:latest
labels: ${{ steps.meta.outputs.labels }}
deploy:
needs: build
runs-on: ubuntu-latest
@@ -221,8 +229,8 @@ jobs:
echo "Attempting to pull images from GitHub Container Registry..."
if echo $DEPLOY_TOKEN | docker login ghcr.io -u remmerinio --password-stdin; then
echo "✅ Successfully logged into GHCR"
if docker-compose -f compose.yml pull web worker beat; then
echo "✅ Successfully pulled web images from GHCR"
if docker-compose -f compose.yml pull web worker beat paperless; then
echo "✅ Successfully pulled web and paperless images from GHCR"
USE_REMOTE_IMAGES=true
else
echo "⚠️ Failed to pull images from GHCR, will build locally"
@@ -233,14 +241,15 @@ jobs:
USE_REMOTE_IMAGES=false
fi
# Pull other standard images (paperless, redis, postgres, grampsweb)
# Pull other standard images (redis, postgres, grampsweb)
echo "Pulling standard Docker images..."
docker-compose -f compose.yml pull db redis paperless grampsweb || echo "Some standard images failed to pull, will use cached versions"
docker-compose -f compose.yml pull db redis grampsweb || echo "Some standard images failed to pull, will use cached versions"
# If we couldn't pull from GHCR, build locally
if [ "$USE_REMOTE_IMAGES" = "false" ]; then
echo "🔨 Building images locally from source code..."
docker build -t ghcr.io/remmerinio/stiftung-management-system:latest ./app
docker build -t ghcr.io/remmerinio/stiftung-management-system-paperless:latest ./paperless
fi
# Stop containers and clean up