mirror of
https://github.com/opencloud-eu/opencloud-compose.git
synced 2026-12-06 01:43:12 +08:00
Compare commits
11 Commits
5df831de9a
...
renovate/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf76f2ea15 | ||
|
|
2a752e34e4 | ||
|
|
e4831cccc7 | ||
|
|
6de23f8e55 | ||
|
|
9456bdbdd7 | ||
|
|
c5011a3bbd | ||
|
|
8f32083333 | ||
|
|
97d004d112 | ||
|
|
b5f86881ee | ||
|
|
68765c6352 | ||
|
|
67f64d12b6 |
10
README.md
10
README.md
@@ -196,11 +196,17 @@ By default, OpenCloud Compose uses the base variant of `apache/tika` which provi
|
||||
|
||||
The base variant is recommended for most use cases. If you need advanced features like specialized OCR processing or specific image format support, you can switch to the full variant by setting `TIKA_DOCKER_VARIANT=full` in your `.env` file.
|
||||
|
||||
### Thumbnails
|
||||
|
||||
The thumbnails service of OpenCloud runs in its own `thumbnails` container, started from the same image as `opencloud`. Decoding untrusted images is a classic attack surface, so it happens in a container without access to the config, the secrets or the data of OpenCloud: a read-only filesystem, no capabilities and only the internal `thumbnails-net` network, which has no route to the outside. The service has no authentication, so never publish its port or route to it through the reverse proxy.
|
||||
|
||||
The webdav service posts the source images to `http://thumbnails:9186`. The additional container needs about 50 MB of RAM.
|
||||
|
||||
### With imagor Previews
|
||||
|
||||
The OpenCloud image ships no libheif on purpose, so a heic, heif or avif is refused with `406 unreadable image`. imagor reads those formats. Enable it using either method:
|
||||
|
||||
> **Version Requirement**: This setup needs OpenCloud 9.0.0 or newer.
|
||||
> **Version Requirement**: This setup needs OpenCloud 9.0.0 or newer and Docker Compose 2.24.4 or newer, which understands the `!override` tag.
|
||||
|
||||
Using `-f` flags:
|
||||
```bash
|
||||
@@ -213,7 +219,7 @@ COMPOSE_FILE=docker-compose.yml:thumbnails/imagor.yml:traefik/opencloud.yml
|
||||
```
|
||||
|
||||
This setup includes:
|
||||
- imagor as the preview generator OpenCloud posts source images to
|
||||
- imagor as the preview generator OpenCloud posts source images to, replacing the `thumbnails` container, which is scaled to 0
|
||||
- Previews for heic, heif and avif files, including image sequences, in the file list and the preview app
|
||||
- imagor on an internal network without a route to the outside, with a read-only filesystem and no capabilities
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ services:
|
||||
clamav:
|
||||
condition: service_healthy
|
||||
clamav:
|
||||
image: ${CLAMAV_DOCKER_IMAGE:-clamav/clamav}:${CLAMAV_DOCKER_TAG:-1.5.4}
|
||||
image: ${CLAMAV_DOCKER_IMAGE:-clamav/clamav}:${CLAMAV_DOCKER_TAG:-1.5.5}
|
||||
environment:
|
||||
# Accepts a number with optional K, M or G suffix. Must be greater or equal to ANTIVIRUS_MAX_SCAN_SIZE above.
|
||||
# K = KiB (1024), M = MiB (1024 * 1024), G = GiB (1024 * 1024 * 1024)
|
||||
|
||||
@@ -8,6 +8,7 @@ directives:
|
||||
- 'wss://${COMPANION_DOMAIN|companion.opencloud.test}${TRAEFIK_PORT_HTTPS}/'
|
||||
- 'https://raw.githubusercontent.com/opencloud-eu/awesome-apps/'
|
||||
- 'https://${IDP_DOMAIN|keycloak.opencloud.test}${TRAEFIK_PORT_HTTPS}/'
|
||||
- 'https://${COLLABORA_DOMAIN|collabora.opencloud.test}${TRAEFIK_PORT_HTTPS}/'
|
||||
- 'https://update.opencloud.eu/'
|
||||
- 'https://tile.openstreetmap.org/'
|
||||
default-src:
|
||||
|
||||
@@ -7,6 +7,7 @@ services:
|
||||
user: ${OC_CONTAINER_UID_GID:-1000:1000}
|
||||
networks:
|
||||
opencloud-net:
|
||||
thumbnails-net:
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
# run opencloud init to initialize a configuration file with random secrets
|
||||
@@ -65,6 +66,9 @@ services:
|
||||
# with X being a number larger than 10240000. You can set a custom limit, for example 20480000.
|
||||
# Keep in mind that doubling the GRPC_MAX_RECEIVED_MESSAGE_SIZE limit may also double your peak RAM usage.
|
||||
OC_GRPC_MAX_RECEIVED_MESSAGE_SIZE:
|
||||
# thumbnails are made by the thumbnails container below, webdav posts the images there
|
||||
OC_EXCLUDE_RUN_SERVICES: thumbnails
|
||||
WEBDAV_THUMBNAILS_GENERATOR_URL: http://thumbnails:9186
|
||||
volumes:
|
||||
- ./config/opencloud/csp.yaml:/etc/opencloud/csp.yaml
|
||||
- ./config/opencloud/apps.yaml:/etc/opencloud/apps.yaml
|
||||
@@ -73,6 +77,45 @@ services:
|
||||
- ${OC_CONFIG_DIR:-opencloud-config}:/etc/opencloud
|
||||
- ${OC_DATA_DIR:-opencloud-data}:/var/lib/opencloud
|
||||
- ${OC_APPS_DIR:-./config/opencloud/apps}:/var/lib/opencloud/web/assets/apps
|
||||
depends_on:
|
||||
thumbnails:
|
||||
condition: service_healthy
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
|
||||
# The built-in thumbnails service runs in its own container, so decoding untrusted
|
||||
# images happens without access to the config, the secrets or the data of OpenCloud.
|
||||
# It has no authentication, so it is only reachable on the internal thumbnails-net.
|
||||
# Do NOT publish a port or expose it via the reverse proxy.
|
||||
thumbnails:
|
||||
# same image as opencloud, keep both tags in sync
|
||||
# renovate: depName=opencloudeu/opencloud-rolling
|
||||
image: ${OC_DOCKER_IMAGE:-opencloudeu/opencloud-rolling}:${OC_DOCKER_TAG:-9.1.0}
|
||||
user: ${OC_CONTAINER_UID_GID:-1000:1000}
|
||||
command: ["thumbnails", "server"]
|
||||
environment:
|
||||
THUMBNAILS_HTTP_ADDR: 0.0.0.0:9186
|
||||
# webdav finds the service by WEBDAV_THUMBNAILS_GENERATOR_URL, there is no nats to register with
|
||||
MICRO_REGISTRY: memory
|
||||
OC_LOG_LEVEL: ${LOG_LEVEL:-info}
|
||||
OC_LOG_COLOR: "${LOG_PRETTY:-false}"
|
||||
OC_LOG_PRETTY: "${LOG_PRETTY:-false}"
|
||||
networks:
|
||||
thumbnails-net:
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp:size=256m
|
||||
cap_drop:
|
||||
- ALL
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
healthcheck:
|
||||
test: ["CMD", "opencloud", "thumbnails", "health"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 5s
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
@@ -83,3 +126,5 @@ volumes:
|
||||
|
||||
networks:
|
||||
opencloud-net:
|
||||
thumbnails-net:
|
||||
internal: true
|
||||
|
||||
@@ -28,7 +28,8 @@ services:
|
||||
PROXY_ROLE_ASSIGNMENT_DRIVER: ${PROXY_ROLE_ASSIGNMENT_DRIVER:-oidc}
|
||||
OC_OIDC_ISSUER: ${IDP_ISSUER_URL:-https://keycloak.opencloud.test/realms/openCloud}
|
||||
# This specifies to start all services except idm and idp. These are replaced by external services.
|
||||
OC_EXCLUDE_RUN_SERVICES: idm,idp
|
||||
# thumbnails runs in its own container, see docker-compose.yml
|
||||
OC_EXCLUDE_RUN_SERVICES: idm,idp,thumbnails
|
||||
# IdP specific configuration for auto-provisioning
|
||||
OC_LDAP_SERVER_WRITE_ENABLED: "true"
|
||||
PROXY_AUTOPROVISION_ACCOUNTS: "true"
|
||||
|
||||
@@ -19,7 +19,8 @@ services:
|
||||
FRONTEND_READONLY_USER_ATTRIBUTES: "user.onPremisesSamAccountName,user.displayName,user.mail,user.passwordProfile,user.accountEnabled,user.appRoleAssignments"
|
||||
OC_LDAP_SERVER_WRITE_ENABLED: "false" # the ldap is managed by Keycloak, so it is not writable by OpenCloud
|
||||
# This specifies to start all services except idm and idp. These are replaced by external services.
|
||||
OC_EXCLUDE_RUN_SERVICES: idm,idp
|
||||
# thumbnails runs in its own container, see docker-compose.yml
|
||||
OC_EXCLUDE_RUN_SERVICES: idm,idp,thumbnails
|
||||
# Keycloak IDP specific configuration
|
||||
PROXY_AUTOPROVISION_ACCOUNTS: "false"
|
||||
PROXY_ROLE_ASSIGNMENT_DRIVER: "oidc"
|
||||
|
||||
@@ -7,7 +7,3 @@ services:
|
||||
# if OpenCloud runs as a single process, all <debug>/metrics endpoints
|
||||
# will expose the same metrics, so it's sufficient to query one endpoint
|
||||
PROXY_DEBUG_ADDR: 0.0.0.0:9205
|
||||
|
||||
networks:
|
||||
opencloud-net:
|
||||
external: true
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
# external sites needs to have additional routes configured in the proxy
|
||||
- ./config/opencloud/proxy.yaml:/etc/opencloud/proxy.yaml
|
||||
radicale:
|
||||
image: ${RADICALE_DOCKER_IMAGE:-opencloudeu/radicale}:${RADICALE_DOCKER_TAG:-v3.9.0}
|
||||
image: ${RADICALE_DOCKER_IMAGE:-opencloudeu/radicale}:${RADICALE_DOCKER_TAG:-v3.9.2}
|
||||
user: ${OC_CONTAINER_UID_GID:-1000:1000}
|
||||
networks:
|
||||
opencloud-net:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# This is not a production ready setup.
|
||||
services:
|
||||
ldap-manager:
|
||||
image: ${LDAP_MANAGER_DOCKER_IMAGE:-phpldapadmin/phpldapadmin}:${LDAP_MANAGER_DOCKER_TAG:-2.3.12}
|
||||
image: ${LDAP_MANAGER_DOCKER_IMAGE:-phpldapadmin/phpldapadmin}:${LDAP_MANAGER_DOCKER_TAG:-2.3.13}
|
||||
networks:
|
||||
opencloud-net:
|
||||
environment:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
services:
|
||||
imagor:
|
||||
image: ${IMAGOR_DOCKER_IMAGE:-shumc/imagor}:${IMAGOR_DOCKER_TAG:-1.10.4}
|
||||
image: ${IMAGOR_DOCKER_IMAGE:-shumc/imagor}:${IMAGOR_DOCKER_TAG:-1.10.5}
|
||||
environment:
|
||||
IMAGOR_UNSAFE: "true"
|
||||
UPLOAD_LOADER_ENABLE: "true"
|
||||
@@ -35,10 +35,17 @@ services:
|
||||
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:
|
||||
# replaces the thumbnails container, so opencloud must not wait for it
|
||||
depends_on: !override
|
||||
imagor:
|
||||
condition: service_healthy
|
||||
|
||||
# imagor replaces the built-in thumbnails container. Scaling it to 0 also stops
|
||||
# it when imagor is added to an existing deployment.
|
||||
thumbnails:
|
||||
deploy:
|
||||
replicas: 0
|
||||
|
||||
networks:
|
||||
imagor-net:
|
||||
internal: true
|
||||
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
- "traefik.http.services.opencloud.loadbalancer.server.port=9200"
|
||||
- "traefik.http.routers.opencloud.${TRAEFIK_SERVICES_TLS_CONFIG}"
|
||||
traefik:
|
||||
image: traefik:v3.7.19
|
||||
image: traefik:v3.8.0
|
||||
# release notes: https://github.com/traefik/traefik/releases
|
||||
user: ${TRAEFIK_CONTAINER_UID_GID:-0:0}
|
||||
networks:
|
||||
|
||||
@@ -50,7 +50,7 @@ services:
|
||||
restart: "no"
|
||||
|
||||
collabora:
|
||||
image: collabora/code:26.04.6.1.1
|
||||
image: collabora/code:26.04.6.2.1
|
||||
# release notes: https://www.collaboraonline.com/release-notes/
|
||||
networks:
|
||||
opencloud-net:
|
||||
@@ -64,6 +64,8 @@ services:
|
||||
--o:ssl.enable=${COLLABORA_SSL_ENABLE:-true}
|
||||
--o:ssl.ssl_verification=${COLLABORA_SSL_VERIFICATION:-true}
|
||||
--o:ssl.termination=true
|
||||
--o:remote_links.enable=true
|
||||
--o:server_name=${COLLABORA_DOMAIN:-collabora.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-}
|
||||
--o:welcome.enable=false
|
||||
--o:net.frame_ancestors=${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-}
|
||||
--o:net.lok_allow.host[14]=${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-}
|
||||
|
||||
Reference in New Issue
Block a user