2022-08-04 03:21:28 -07:00
|
|
|
# SPDX-FileCopyrightText: 2022 James R. Barlow
|
|
|
|
|
# SPDX-License-Identifier: MIT
|
2020-03-03 02:15:35 -08:00
|
|
|
---
|
|
|
|
|
version: "3.3"
|
|
|
|
|
services:
|
|
|
|
|
ocrmypdf:
|
|
|
|
|
restart: always
|
|
|
|
|
container_name: ocrmypdf
|
2026-06-17 15:13:19 -07:00
|
|
|
image: jbarlow83/ocrmypdf-alpine
|
2020-03-03 02:15:35 -08:00
|
|
|
volumes:
|
|
|
|
|
- "/media/scan:/input"
|
|
|
|
|
- "/mnt/scan:/output"
|
|
|
|
|
environment:
|
2021-02-14 01:23:01 -08:00
|
|
|
- OCR_OUTPUT_DIRECTORY_YEAR_MONTH=0
|
2026-06-17 15:13:19 -07:00
|
|
|
# The image runs as the non-root "app" user (uid 1000) by default. The
|
|
|
|
|
# correct value here depends on your runtime, so that the watcher can write
|
|
|
|
|
# to the /output bind mount and the files end up owned by you:
|
|
|
|
|
# rootful Docker -> your host uid:gid
|
|
|
|
|
# rootless Docker -> "0:0" (container root maps to your host user)
|
|
|
|
|
# Podman -> your host uid:gid, plus `userns_mode: "keep-id"`
|
|
|
|
|
# See docs/docker.md ("Bind-mounted volumes") for the reasoning.
|
2020-03-03 02:15:35 -08:00
|
|
|
user: "<SET TO YOUR USER ID>:<SET TO YOUR GROUP ID>"
|
|
|
|
|
entrypoint: python3
|
2026-06-17 15:13:19 -07:00
|
|
|
command: /app/watcher.py
|