mirror of
https://github.com/opencloud-eu/opencloud-compose.git
synced 2026-12-06 01:43:12 +08:00
feat: add an imagor module for heic, heif and avif previews (#407)
imagor runs on an internal network, the webdav service points at it as the preview generator, and the three formats plus their sequence types are announced, so previews show up in the file list and the preview app. The OpenCloud image ships no libheif on purpose, so its own generator refuses them. Documented in README and .env.example, image tag pinned and tracked by renovate. Needs OpenCloud 9.0.0 or newer.
This commit is contained in:
45
thumbnails/imagor.yml
Normal file
45
thumbnails/imagor.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
services:
|
||||
imagor:
|
||||
# renovate: depName=shumc/imagor
|
||||
image: ${IMAGOR_DOCKER_IMAGE:-shumc/imagor}:${IMAGOR_DOCKER_TAG:-1.9.14}
|
||||
environment:
|
||||
IMAGOR_UNSAFE: "true"
|
||||
UPLOAD_LOADER_ENABLE: "true"
|
||||
UPLOAD_LOADER_MAX_ALLOWED_SIZE: ${IMAGOR_MAX_SOURCE_SIZE:-50000000}
|
||||
HTTP_LOADER_DISABLE: "true"
|
||||
VIPS_MAX_WIDTH: "7680"
|
||||
VIPS_MAX_HEIGHT: "7680"
|
||||
VIPS_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}
|
||||
networks:
|
||||
imagor-net:
|
||||
depends_on:
|
||||
imagor:
|
||||
condition: service_healthy
|
||||
|
||||
networks:
|
||||
imagor-net:
|
||||
internal: true
|
||||
Reference in New Issue
Block a user