Files
opencloud-compose/thumbnails/imagor.yml
Jörn Friedrich Dreyer 9b9bd35745 let imagor make all thumbnails
thumbnails/imagor.yml now also stops the built-in thumbnails service,
it is going to lose libvips and with it most formats. All COMPOSE_FILE
examples include the imagor file.

OpenCloud gets the same max input size as imagor, so both refuse the
same files, and the max width, height and animation frames of imagor
are configurable. UPLOAD_LOADER_MAX_ALLOWED_SIZE is quoted now, an
unquoted large number reaches imagor as 5e+07 which it cannot parse.

OC_EXCLUDE_RUN_SERVICES is now set by imagor.yml and the idm files, and
compose keeps only the value of the last file. Each file prepends the
new EXCLUDE_ADDITIONAL_SERVICES, so combining them works when it lists
all of them: EXCLUDE_ADDITIONAL_SERVICES=idm,idp,thumbnails

That is easy to miss, so the keycloak and external-idp examples carry
it right below the COMPOSE_FILE line. Without it the order decides: the
examples load imagor.yml before the idm file, so only the idle built-in
thumbnails service keeps running. The other way round idm and idp would
be started again.

The documented default imagor tag was still 1.9.14, it is 1.10.4.

related: https://github.com/opencloud-eu/opencloud/issues/3912

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-17 16:01:18 +01:00

54 lines
1.9 KiB
YAML

---
services:
imagor:
# renovate: depName=shumc/imagor
image: ${IMAGOR_DOCKER_IMAGE:-shumc/imagor}:${IMAGOR_DOCKER_TAG:-1.10.4}
environment:
IMAGOR_UNSAFE: "true"
UPLOAD_LOADER_ENABLE: "true"
# quoted, an unquoted large number reaches imagor as 5e+07 which it cannot parse
UPLOAD_LOADER_MAX_ALLOWED_SIZE: "${IMAGOR_MAX_SOURCE_SIZE:-50000000}"
HTTP_LOADER_DISABLE: "true"
# the limits of the built-in thumbnails service
VIPS_MAX_WIDTH: "${IMAGOR_MAX_WIDTH:-7680}"
VIPS_MAX_HEIGHT: "${IMAGOR_MAX_HEIGHT:-7680}"
VIPS_MAX_ANIMATION_FRAMES: "${IMAGOR_MAX_ANIMATION_FRAMES:-100}"
networks:
imagor-net:
read_only: true
tmpfs:
- /tmp:size=256m
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
restart: always
logging:
driver: ${LOG_DRIVER:-local}
healthcheck:
test: ["CMD", "curl", "-sf", "http://127.0.0.1:8000/healthcheck"]
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
opencloud:
environment:
WEBDAV_THUMBNAILS_GENERATOR_URL: http://imagor:8000
OC_THUMBNAILS_ADDITIONAL_SOURCE_TYPES: ${THUMBNAILS_ADDITIONAL_SOURCE_TYPES:-image/heic,image/heif,image/avif,image/heic-sequence,image/heif-sequence}
# in bytes, the same value is handed to imagor above so both refuse the same files
OC_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE: "${IMAGOR_MAX_SOURCE_SIZE:-50000000}"
# the built-in thumbnails service is not needed when imagor makes the thumbnails
# compose takes this value from the last file in COMPOSE_FILE, so when combining with
# idm/ldap-keycloak.yml or idm/external-idp.yml set EXCLUDE_ADDITIONAL_SERVICES=idm,idp,thumbnails
OC_EXCLUDE_RUN_SERVICES: ${EXCLUDE_ADDITIONAL_SERVICES:-}${EXCLUDE_ADDITIONAL_SERVICES:+,}thumbnails
networks:
imagor-net:
depends_on:
imagor:
condition: service_healthy
networks:
imagor-net:
internal: true