diff --git a/.env.example b/.env.example index 61a6bf1a6..580ba8655 100644 --- a/.env.example +++ b/.env.example @@ -81,6 +81,20 @@ TRAEFIK_LOG_LEVEL= # Don't use ports in the range of 8000-9999 and 5232 as those ports are used internally and therefore might create conflicts. #TRAEFIK_PORT_HTTP=4080 #TRAEFIK_PORT_HTTPS=4443 +# Port of the internal (non-published) Traefik entrypoint used for the direct +# collaboration font routes. It is not published to the host and only reachable +# by containers on the opencloud-net network. +#COLLABORATION_FONT_PORT=7443 +# HTTPS URL under which collabora fetches the font list and the font files from the +# collaboration service (remote_font_config). Collabora only accepts https here and +# the URL must be reachable from the collabora container. If unset, collabora is +# not configured with a remote font config. +# With traefik use the internal entrypoint: +#COLLABORATION_FONT_BASE_URL=https://cloud.opencloud.test:7443/collaboration/fonts +# With an external proxy, add an https route on the proxy that forwards only +# /collaboration/fonts to 127.0.0.1:9300 (published by external-proxy/collabora.yml) +# and use the URL of that route. +#COLLABORATION_FONT_BASE_URL= ## OpenCloud Settings ## # The opencloud container image. @@ -241,6 +255,11 @@ COLLABORA_SSL_VERIFICATION=false # but also limits concurrent open connections to 20 and concurrent open documents to 10. # Default is false if not specified. COLLABORA_HOME_MODE= +# Override the list of core apps of the OpenCloud Web UI (comma separated). +# A custom list replaces the default one, so it must include "office-settings" +# to keep the font management UI available. +# Defaults to "files,search,text-editor,pdf-viewer,external,admin-settings,epub-reader,preview,app-store,rclone-crypt,office-settings" +#WEB_UI_CORE_APPS= ### Euro Office Settings ### diff --git a/external-proxy/collabora.yml b/external-proxy/collabora.yml index f708e9fd2..ca2231bf7 100644 --- a/external-proxy/collabora.yml +++ b/external-proxy/collabora.yml @@ -1,5 +1,13 @@ --- services: + opencloud: + environment: + # bind the collaboration service to all interfaces, so that the + # external proxy can route the direct font access of collabora to it + COLLABORATION_HTTP_ADDR: "0.0.0.0:9300" + ports: + # expose the collaboration service on localhost + - "127.0.0.1:9300:9300" collabora: ports: # expose the collabora server on localhost diff --git a/traefik/collabora.yml b/traefik/collabora.yml index 1fb4cee9e..054e7a668 100644 --- a/traefik/collabora.yml +++ b/traefik/collabora.yml @@ -1,6 +1,24 @@ --- services: + opencloud: + environment: + # serve the collaboration HTTP service on the docker network so that + # traefik can route the direct font access of collabora to it + COLLABORATION_HTTP_ADDR: "0.0.0.0:9300" + labels: + # internal route for direct font access to the collaboration service; + # only reachable on the internal entrypoint (not published to the host) + # and limited to reading the font list and the font files + - "traefik.http.routers.collab-fonts.entrypoints=internal" + - "traefik.http.routers.collab-fonts.rule=Host(`${OC_DOMAIN:-cloud.opencloud.test}`) && Method(`GET`) && PathPrefix(`/collaboration/fonts`) && !PathPrefix(`/collaboration/fonts/manage`) && !PathPrefix(`/collaboration/fonts/preview`)" + - "traefik.http.routers.collab-fonts.${TRAEFIK_SERVICES_TLS_CONFIG}" + - "traefik.http.routers.collab-fonts.service=collab-fonts" + - "traefik.http.services.collab-fonts.loadbalancer.server.port=9300" traefik: + environment: + # internal (non-published) entrypoint for the direct font access to the + # collaboration service; reachable only by containers on opencloud-net + - "TRAEFIK_CUSTOM_ARGS=${TRAEFIK_CUSTOM_ARGS:-} --entryPoints.internal.address=:${COLLABORATION_FONT_PORT:-7443}" networks: opencloud-net: aliases: diff --git a/weboffice/collabora.yml b/weboffice/collabora.yml index e3e016262..b2dacac63 100644 --- a/weboffice/collabora.yml +++ b/weboffice/collabora.yml @@ -13,8 +13,7 @@ services: FRONTEND_APP_HANDLER_SECURE_VIEW_APP_ADDR: eu.opencloud.api.collaboration GRAPH_AVAILABLE_ROLES: "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5,a8d5fe5e-96e3-418d-825b-534dbdf22b99,fb6c3e19-e378-47e5-b277-9732f9de6e21,58c63c02-1d89-4572-916a-870abc5a1b7d,2d00ce52-1fc2-4dbc-8b95-a73b73395f5a,1c996275-f1c9-4e71-abdf-a42f6495e960,312c0871-5ef7-4b3a-85b6-0e4074c64049,aa97fe03-7980-45ac-9e50-b325749fd7e6" # collaboration service configuration; the WOPI endpoint is served by the - # opencloud proxy on the opencloud domain (/wopi and /collaboration routes), - # so no separate wopiserver domain, route or port is needed + # opencloud proxy on the opencloud domain (/wopi and /collaboration routes) COLLABORATION_WOPI_SRC: https://${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} COLLABORATION_APP_NAME: "CollaboraOnline" COLLABORATION_APP_PRODUCT: "Collabora" @@ -22,6 +21,12 @@ services: COLLABORATION_APP_ICON: https://${COLLABORA_DOMAIN:-collabora.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-}/favicon.ico COLLABORATION_APP_INSECURE: "${INSECURE:-true}" COLLABORATION_CS3API_DATAGATEWAY_INSECURE: "${INSECURE:-true}" + # base URL for the font files; must match the remote_font_config.url + # configured for collabora. Defaults to the opencloud proxy URL if empty. + COLLABORATION_FONT_BASE_URL: "${COLLABORATION_FONT_BASE_URL:-}" + # enable the office-settings app that provides the font management UI; + # can be overridden via WEB_UI_CORE_APPS in the .env file + WEB_UI_CORE_APPS: "${WEB_UI_CORE_APPS:-files,search,text-editor,pdf-viewer,external,admin-settings,epub-reader,preview,app-store,rclone-crypt,office-settings}" # One-shot service that generates the WOPI proof key on first start and # keeps it in a named volume, like the proofKeyGeneration feature of the @@ -68,6 +73,7 @@ services: --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:-} --o:home_mode.enable=${COLLABORA_HOME_MODE:-false} + ${COLLABORATION_FONT_BASE_URL:+--o:remote_font_config.url=${COLLABORATION_FONT_BASE_URL}} username: ${COLLABORA_ADMIN_USER:-admin} password: ${COLLABORA_ADMIN_PASSWORD:-admin} cap_add: