diff --git a/.env.example b/.env.example index 61ab441..0588b8e 100644 --- a/.env.example +++ b/.env.example @@ -24,6 +24,10 @@ INSECURE=true #COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml:idm/ldap-keycloak.yml:traefik/ldap-keycloak.yml # External IDP #COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:traefik/collabora.yml:idm/external-idp.yml +# Euro Office with traefik and letsencrypt +#COMPOSE_FILE=docker-compose.yml:weboffice/euroffice.yml:traefik/opencloud.yml:traefik/euroffice.yml +# Euro Office with external proxy (Nginx, Caddy, etc.) +#COMPOSE_FILE=docker-compose.yml:weboffice/euroffice.yml:external-proxy/opencloud.yml:external-proxy/euroffice.yml ## Traefik Settings ## # Note: Traefik is always enabled and can't be disabled. @@ -215,9 +219,9 @@ TIKA_IMAGE= # Domain of Collabora, where you can find the frontend. # Defaults to "collabora.opencloud.test" COLLABORA_DOMAIN= -# Domain of the wopiserver which handles Collabora. -# Defaults to "wopiserver.opencloud.test" -WOPISERVER_DOMAIN= +# NOTE: The WOPI server runs inside the main OpenCloud process and is served by +# the OpenCloud proxy on the main OpenCloud domain (OC_DOMAIN) under the /wopi and +# /collaboration paths. It no longer needs its own domain. # Admin user for Collabora. # Defaults to "admin". # Collabora Admin Panel URL: @@ -239,6 +243,21 @@ COLLABORA_SSL_VERIFICATION=false COLLABORA_HOME_MODE= +### Euro Office Settings ### +# Domain of Euro Office, where you can find the document server. +# Defaults to "euro-office.opencloud.test" +EURO_OFFICE_DOMAIN= +# JWT Secret for Euro Office. IMPORTANT: Change this for production! +# Defaults to "changeme" +EURO_OFFICE_JWT_SECRET= +# Euro Office Docker image. +# Defaults to "ghcr.io/euro-office/documentserver" +EURO_OFFICE_DOCKER_IMAGE= +# Euro Office Docker tag. +# Defaults to "latest" +EURO_OFFICE_DOCKER_TAG= + + ### Virusscanner Settings ### # IMPORTANT: If you enable antivirus, you also MUST configure the START_ADDITIONAL_SERVICES # envvar in the OpenCloud Settings above by adding 'antivirus' to the list. @@ -304,6 +323,14 @@ LDAP_BIND_PASSWORD= ## Autoprovisioning Mode ## # Use together with idm/external-idp.yml +# Role assignment driver for the proxy. Defaults to "oidc". +# Possible values: "oidc", "default" +# When set to "oidc", roles are assigned based on OIDC claims. +# When set to "default", all users get the 'user' role assigned. +PROXY_ROLE_ASSIGNMENT_DRIVER= +# Assign the default 'user' role to new users. Defaults to "false". +# Set to "true" when using PROXY_ROLE_ASSIGNMENT_DRIVER=default +GRAPH_ASSIGN_DEFAULT_USER_ROLE= # If you want to use a keycloak for local testing, you can use testing/external-keycloak.yml and testing/ldap-manager.yml # Domain of your Identity Provider. IDP_DOMAIN= diff --git a/README.md b/README.md index 7b35c0c..c9816d7 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ OpenCloud Compose offers a modular approach to deploying OpenCloud with several - **Standard deployment** with Traefik reverse proxy and Let's Encrypt certificates or certificates from files - **External proxy** support for environments with existing reverse proxies (like Nginx, Caddy, etc.) - **Collabora Online** integration for document editing +- **Euro Office** integration for document editing - **Keycloak and LDAP** integration for centralized identity management - **Full text search** with Apache Tika for content extraction and metadata analysis - **Monitoring** with metrics endpoints for observability and performance monitoring @@ -107,9 +108,12 @@ This setup includes: ### With Collabora Online +> [!NOTE] +> Collabora Online and [Euro Office](#with-euro-office) are mutually exclusive web office backends — both use the same `collaboration` (WOPI) service, which runs inside the main OpenCloud process. Enable only one of them at a time. + Include Collabora for document editing using either method: -> **DNS Requirements**: This setup requires DNS entries for the main OpenCloud domain, Collabora subdomain, and WOPI server subdomain. Configure DNS A/AAAA records for your domains (e.g., `cloud.example.com`, `collabora.example.com`, `wopiserver.example.com`) or use a wildcard DNS entry (`*.example.com`). +> **DNS Requirements**: This setup requires DNS entries for the main OpenCloud domain and the Collabora subdomain. The WOPI server is served by OpenCloud on the main domain, so it does not need its own subdomain. Configure DNS A/AAAA records for your domains (e.g., `cloud.example.com`, `collabora.example.com`) or use a wildcard DNS entry (`*.example.com`). Using `-f` flags: ```bash @@ -124,9 +128,44 @@ COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:traefik/opencloud.yml:tr > **For local development only**: Add to `/etc/hosts`: > ``` > 127.0.0.1 collabora.opencloud.test -> 127.0.0.1 wopiserver.opencloud.test > ``` +> [!IMPORTANT] +> **Upgrading from a previous setup**: The `collaboration` (WOPI) service no longer runs as a separate container or on its own `wopiserver.*` domain — it now runs inside the main OpenCloud process and is served by the OpenCloud proxy on the main domain under the `/wopi` and `/collaboration` paths. When upgrading: +> - Pull the latest compose files and recreate the stack (`docker compose up -d`). The old `collaboration` container is removed automatically. +> - You can retire the `wopiserver.*` DNS entry (and its `/etc/hosts` line), its reverse-proxy/Traefik route, and the `WOPISERVER_DOMAIN` variable in `.env` — all are now unused. +> - If you run behind an external proxy, make sure it forwards `/wopi` and `/collaboration` on the OpenCloud domain to OpenCloud (port 9200). Forwarding the whole OpenCloud domain, as already configured, covers this. + +### With Euro Office + +> [!NOTE] +> Euro Office and [Collabora Online](#with-collabora-online) are mutually exclusive web office backends — both use the same `collaboration` (WOPI) service, which runs inside the main OpenCloud process. Enable only one of them at a time. + +Include Euro Office for document editing using either method: + +> **DNS Requirements**: This setup requires DNS entries for the main OpenCloud domain and the Euro Office subdomain. The WOPI server is served by OpenCloud on the main domain, so it does not need its own subdomain. Configure DNS A/AAAA records for your domains (e.g., `cloud.example.com`, `euro-office.example.com`) or use a wildcard DNS entry (`*.example.com`). + +Using `-f` flags: +```bash +docker compose -f docker-compose.yml -f weboffice/euroffice.yml -f traefik/opencloud.yml -f traefik/euroffice.yml up -d +``` + +Or by setting in `.env`: +``` +COMPOSE_FILE=docker-compose.yml:weboffice/euroffice.yml:traefik/opencloud.yml:traefik/euroffice.yml +``` + +> **For local development only**: Add to `/etc/hosts`: +> ``` +> 127.0.0.1 euro-office.opencloud.test +> ``` + +> [!IMPORTANT] +> Set a strong `EURO_OFFICE_JWT_SECRET` in your `.env` file for production. The default value (`changeme`) is intended for local development only. + +> [!NOTE] +> Upgrading from a previous setup? See [Upgrading from a previous setup](#with-collabora-online) under Collabora Online — the WOPI server changes (no more separate container or `wopiserver.*` domain) apply to Euro Office as well. + ### With Full Text Search Enable full text search capabilities with Apache Tika using either method: @@ -226,7 +265,28 @@ COMPOSE_FILE=docker-compose.yml:weboffice/collabora.yml:external-proxy/opencloud This exposes the necessary ports: - OpenCloud: 9200 - Collabora: 9980 -- WOPI server: 9300 + +The WOPI server runs inside the OpenCloud process and is served on the OpenCloud port (9200) under the `/wopi` and `/collaboration` paths, so no separate port needs to be exposed for it. + +To use Euro Office instead of Collabora behind an external proxy, swap the web office compose files: + +```bash +docker compose -f docker-compose.yml -f weboffice/euroffice.yml -f external-proxy/opencloud.yml -f external-proxy/euroffice.yml up -d +``` + +Or by setting in `.env`: +``` +COMPOSE_FILE=docker-compose.yml:weboffice/euroffice.yml:external-proxy/opencloud.yml:external-proxy/euroffice.yml +``` + +This exposes the necessary ports: +- OpenCloud: 9200 +- Euro Office: 9900 + +As with Collabora, the WOPI server is served on the OpenCloud port (9200) under the `/wopi` and `/collaboration` paths and needs no separate port. + +> [!WARNING] +> `external-proxy/euroffice.yml` binds the exposed ports to `127.0.0.1` only. If your external proxy runs on a different host, use `external-proxy/euroffice-exposed.yml`, which binds to all interfaces (`0.0.0.0`). Only expose these ports when you know what you are doing. **Please note:** If you're using **Nginx Proxy Manager (NPM)**, you **should NOT** activate **"Block Common Exploits"** for the Proxy Host. @@ -341,7 +401,10 @@ Key variables: | `OC_DATA_DIR` | Data directory path | (Docker volume) | | `INSECURE` | Skip certificate validation | true | | `COLLABORA_DOMAIN` | Collabora domain | collabora.opencloud.test | -| `WOPISERVER_DOMAIN` | WOPI server domain | wopiserver.opencloud.test | +| `EURO_OFFICE_DOMAIN` | Euro Office document server domain | euro-office.opencloud.test | +| `EURO_OFFICE_JWT_SECRET` | JWT secret for Euro Office (change for production!) | changeme | +| `EURO_OFFICE_DOCKER_IMAGE` | Euro Office Docker image | ghcr.io/euro-office/documentserver | +| `EURO_OFFICE_DOCKER_TAG` | Euro Office Docker tag | latest | | `TIKA_IMAGE` | Apache Tika image tag | apache/tika:slim | | `KEYCLOAK_DOMAIN` | Keycloak domain | keycloak.opencloud.test | | `KEYCLOAK_ADMIN` | Keycloak admin username | kcadmin | diff --git a/config/euro-office/app-registry.yaml b/config/euro-office/app-registry.yaml new file mode 100644 index 0000000..65c0107 --- /dev/null +++ b/config/euro-office/app-registry.yaml @@ -0,0 +1,71 @@ +app_registry: + mimetypes: + - mime_type: application/pdf + extension: pdf + name: PDF + description: PDF document + icon: '' + default_app: '' + allow_creation: false + - mime_type: application/vnd.oasis.opendocument.text + extension: odt + name: OpenDocument + description: OpenDocument text document + icon: '' + default_app: Collabora + allow_creation: true + - mime_type: application/vnd.oasis.opendocument.spreadsheet + extension: ods + name: OpenSpreadsheet + description: OpenDocument spreadsheet document + icon: '' + default_app: Collabora + allow_creation: true + - mime_type: application/vnd.oasis.opendocument.presentation + extension: odp + name: OpenPresentation + description: OpenDocument presentation document + icon: '' + default_app: Collabora + - mime_type: application/vnd.oasis.opendocument.graphics + extension: odg + name: OpenGraphics + description: OpenDocument graphics document + icon: '' + default_app: Collabora + allow_creation: true + - mime_type: application/vnd.openxmlformats-officedocument.wordprocessingml.document + extension: docx + name: Microsoft Word + description: Microsoft Word document + icon: '' + default_app: Euro-Office + allow_creation: true + - mime_type: application/vnd.openxmlformats-officedocument.wordprocessingml.form + extension: docxf + name: Form Document + description: Form Document + icon: '' + default_app: Euro-Office + allow_creation: true + - mime_type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + extension: xlsx + name: Microsoft Excel + description: Microsoft Excel document + icon: '' + default_app: Euro-Office + allow_creation: true + - mime_type: application/vnd.openxmlformats-officedocument.presentationml.presentation + extension: pptx + name: Microsoft PowerPoint + description: Microsoft PowerPoint document + icon: '' + default_app: Euro-Office + allow_creation: true + - mime_type: application/vnd.jupyter + extension: ipynb + name: Jupyter Notebook + description: Jupyter Notebook + icon: '' + default_app: '' + allow_creation: true diff --git a/config/opencloud/csp.yaml b/config/opencloud/csp.yaml index 22b9eb1..06d807f 100644 --- a/config/opencloud/csp.yaml +++ b/config/opencloud/csp.yaml @@ -22,6 +22,7 @@ directives: - 'https://embed.diagrams.net/' # In contrary to bash and docker the default is given after the | character - 'https://${COLLABORA_DOMAIN|collabora.opencloud.test}${TRAEFIK_PORT_HTTPS}/' + - 'https://${EURO_OFFICE_DOMAIN|euro-office.opencloud.test}${TRAEFIK_PORT_HTTPS}/' # This is needed for the external-sites web extension when embedding sites - 'https://docs.opencloud.eu' img-src: @@ -32,7 +33,7 @@ directives: - 'https://tile.openstreetmap.org/' # In contrary to bash and docker the default is given after the | character - 'https://${COLLABORA_DOMAIN|collabora.opencloud.test}${TRAEFIK_PORT_HTTPS}/' - - 'https://tile.openstreetmap.org/' + - 'https://${EURO_OFFICE_DOMAIN|euro-office.opencloud.test}${TRAEFIK_PORT_HTTPS}/' manifest-src: - '''self''' media-src: diff --git a/external-proxy/collabora-exposed.yml b/external-proxy/collabora-exposed.yml index a6bb388..c25f265 100644 --- a/external-proxy/collabora-exposed.yml +++ b/external-proxy/collabora-exposed.yml @@ -1,10 +1,6 @@ --- # only expose the ports when you know what you are doing! services: - collaboration: - ports: - # expose the wopi server on all interfaces - - "0.0.0.0:9300:9300" collabora: ports: # expose the collabora server on all interfaces diff --git a/external-proxy/collabora.yml b/external-proxy/collabora.yml index 6458c5e..f708e9f 100644 --- a/external-proxy/collabora.yml +++ b/external-proxy/collabora.yml @@ -1,9 +1,5 @@ --- services: - collaboration: - ports: - # expose the wopi server on localhost - - "127.0.0.1:9300:9300" collabora: ports: # expose the collabora server on localhost diff --git a/external-proxy/euroffice-exposed.yml b/external-proxy/euroffice-exposed.yml new file mode 100644 index 0000000..21f1d9b --- /dev/null +++ b/external-proxy/euroffice-exposed.yml @@ -0,0 +1,7 @@ +--- +# only expose the ports when you know what you are doing! +services: + euro-office: + ports: + # expose the euro-office document server on all interfaces + - "0.0.0.0:9900:80" diff --git a/external-proxy/euroffice.yml b/external-proxy/euroffice.yml new file mode 100644 index 0000000..f04849f --- /dev/null +++ b/external-proxy/euroffice.yml @@ -0,0 +1,6 @@ +--- +services: + euro-office: + ports: + # expose the euro-office document server on localhost + - "127.0.0.1:9900:80" diff --git a/idm/external-idp.yml b/idm/external-idp.yml index fb66889..cf7b775 100644 --- a/idm/external-idp.yml +++ b/idm/external-idp.yml @@ -25,7 +25,7 @@ services: WEBFINGER_IOS_OIDC_CLIENT_SCOPES: ${WEBFINGER_IOS_OIDC_CLIENT_SCOPES} WEBFINGER_DESKTOP_OIDC_CLIENT_ID: ${WEBFINGER_DESKTOP_OIDC_CLIENT_ID} WEBFINGER_DESKTOP_OIDC_CLIENT_SCOPES: ${WEBFINGER_DESKTOP_OIDC_CLIENT_SCOPES} - PROXY_ROLE_ASSIGNMENT_DRIVER: "oidc" + 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 @@ -47,7 +47,7 @@ services: OC_LDAP_DISABLE_USER_MECHANISM: "attribute" OC_ADMIN_USER_ID: "" SETTINGS_SETUP_DEFAULT_ASSIGNMENTS: "false" - GRAPH_ASSIGN_DEFAULT_USER_ROLE: "false" + GRAPH_ASSIGN_DEFAULT_USER_ROLE: ${GRAPH_ASSIGN_DEFAULT_USER_ROLE:-false} GRAPH_USERNAME_MATCH: "none" # We need to set the IDP_DOMAIN to allow the CSP rules to be set correctly IDP_DOMAIN: ${IDP_DOMAIN:-keycloak.opencloud.test} diff --git a/traefik/collabora.yml b/traefik/collabora.yml index 808b9e3..1fb4cee 100644 --- a/traefik/collabora.yml +++ b/traefik/collabora.yml @@ -5,16 +5,6 @@ services: opencloud-net: aliases: - ${COLLABORA_DOMAIN:-collabora.opencloud.test} - - ${WOPISERVER_DOMAIN:-wopiserver.opencloud.test} - collaboration: - labels: - - "traefik.enable=true" - - "traefik.http.routers.collaboration.entrypoints=https" - - "traefik.http.routers.collaboration.rule=Host(`${WOPISERVER_DOMAIN:-wopiserver.opencloud.test}`)" - - "traefik.http.routers.collaboration.${TRAEFIK_SERVICES_TLS_CONFIG}" - - "traefik.http.routers.collaboration.service=collaboration" - - "traefik.http.routers.collaboration.middlewares=hsts-header" - - "traefik.http.services.collaboration.loadbalancer.server.port=9300" collabora: labels: - "traefik.enable=true" diff --git a/traefik/euroffice.yml b/traefik/euroffice.yml new file mode 100644 index 0000000..49d221c --- /dev/null +++ b/traefik/euroffice.yml @@ -0,0 +1,18 @@ +--- +services: + traefik: + networks: + opencloud-net: + aliases: + - ${EURO_OFFICE_DOMAIN:-euro-office.opencloud.test} + euro-office: + labels: + - "traefik.enable=true" + - "traefik.http.routers.euro-office.entrypoints=https" + - "traefik.http.routers.euro-office.rule=Host(`${EURO_OFFICE_DOMAIN:-euro-office.opencloud.test}`)" + - "traefik.http.routers.euro-office.${TRAEFIK_SERVICES_TLS_CONFIG}" + - "traefik.http.routers.euro-office.service=euro-office" + - "traefik.http.services.euro-office.loadbalancer.server.port=80" + # websockets can't be opened when this is omitted + - "traefik.http.middlewares.euro-office.headers.customrequestheaders.X-Forwarded-Proto=https" + - "traefik.http.routers.euro-office.middlewares=euro-office" diff --git a/weboffice/collabora.yml b/weboffice/collabora.yml index 431fa6d..6ec3ba7 100644 --- a/weboffice/collabora.yml +++ b/weboffice/collabora.yml @@ -6,55 +6,31 @@ services: # this is needed for setting the correct CSP header COLLABORA_DOMAIN: ${COLLABORA_DOMAIN:-collabora.opencloud.test} TRAEFIK_PORT_HTTPS: ${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} - # expose nats and the reva gateway for the collaboration service - NATS_NATS_HOST: 0.0.0.0 - GATEWAY_GRPC_ADDR: 0.0.0.0:9142 + # run the collaboration (WOPI) service inside the main opencloud process, + # appended to any user defined services in START_ADDITIONAL_SERVICES + OC_ADD_RUN_SERVICES: ${START_ADDITIONAL_SERVICES:-}${START_ADDITIONAL_SERVICES:+,}collaboration # make collabora the secure view app 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: - # renovate: depName=opencloudeu/opencloud-rolling - image: ${OC_DOCKER_IMAGE:-opencloudeu/opencloud-rolling}:${OC_DOCKER_TAG:-6.2.0} - user: ${OC_CONTAINER_UID_GID:-1000:1000} - networks: - opencloud-net: - depends_on: - opencloud: - condition: service_started - collabora: - condition: service_healthy - entrypoint: - - /bin/sh - command: [ "-c", "opencloud collaboration server" ] - environment: - COLLABORATION_GRPC_ADDR: 0.0.0.0:9301 - COLLABORATION_HTTP_ADDR: 0.0.0.0:9300 - MICRO_REGISTRY: "nats-js-kv" - MICRO_REGISTRY_ADDRESS: "opencloud:9233" - COLLABORATION_WOPI_SRC: https://${WOPISERVER_DOMAIN:-wopiserver.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} + # 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 + COLLABORATION_WOPI_SRC: https://${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} COLLABORATION_APP_NAME: "CollaboraOnline" COLLABORATION_APP_PRODUCT: "Collabora" COLLABORATION_APP_ADDR: https://${COLLABORA_DOMAIN:-collabora.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} 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}" - COLLABORATION_LOG_LEVEL: ${LOG_LEVEL:-info} - OC_URL: https://${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} - volumes: - # configure the .env file to use own paths instead of docker internal volumes - - ${OC_CONFIG_DIR:-opencloud-config}:/etc/opencloud - logging: - driver: ${LOG_DRIVER:-local} - restart: always collabora: - image: collabora/code:25.04.10.3.1 + image: collabora/code:26.04.1.4.1 # release notes: https://www.collaboraonline.com/release-notes/ networks: opencloud-net: environment: - aliasgroup1: https://${WOPISERVER_DOMAIN:-wopiserver.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} + # WOPI host allowlist; the WOPI endpoint is served by the opencloud proxy on the opencloud domain + aliasgroup1: https://${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} DONT_GEN_SSL_CERT: "YES" extra_params: | --o:ssl.enable=${COLLABORA_SSL_ENABLE:-true} \ @@ -82,7 +58,13 @@ services: entrypoint: [ '/bin/bash', '-c' ] command: [ 'coolconfig generate-proof-key && /start-collabora-online.sh' ] healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:9980/hosting/discovery" ] + test: + [ + "CMD", + "bash", + "-c", + "exec 3<>/dev/tcp/127.0.0.1/9980 && printf 'GET /hosting/discovery HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | head -1 | grep -q '200 OK'" + ] interval: 15s timeout: 10s retries: 5 diff --git a/weboffice/euroffice.yml b/weboffice/euroffice.yml new file mode 100644 index 0000000..239cd13 --- /dev/null +++ b/weboffice/euroffice.yml @@ -0,0 +1,53 @@ +--- +services: + + opencloud: + environment: + # this is needed for setting the correct CSP header + EURO_OFFICE_DOMAIN: ${EURO_OFFICE_DOMAIN:-euro-office.opencloud.test} + TRAEFIK_PORT_HTTPS: ${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} + # run the collaboration (WOPI) service inside the main opencloud process, + # appended to any user defined services in START_ADDITIONAL_SERVICES + OC_ADD_RUN_SERVICES: ${START_ADDITIONAL_SERVICES:-}${START_ADDITIONAL_SERVICES:+,}collaboration + # 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 + COLLABORATION_WOPI_SRC: https://${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} + COLLABORATION_APP_NAME: "Euro-Office" + COLLABORATION_APP_PRODUCT: "OnlyOffice" + COLLABORATION_APP_ADDR: https://${EURO_OFFICE_DOMAIN:-euro-office.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-} + COLLABORATION_APP_ICON: https://${EURO_OFFICE_DOMAIN:-euro-office.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-}/web-apps/apps/documenteditor/main/resources/img/favicon.ico + COLLABORATION_APP_INSECURE: "${INSECURE:-true}" + COLLABORATION_CS3API_DATAGATEWAY_INSECURE: "${INSECURE:-true}" + COLLABORATION_APP_PROOF_DISABLE: "true" + volumes: + - ./config/euro-office/app-registry.yaml:/etc/opencloud/app-registry.yaml + + euro-office: + image: ${EURO_OFFICE_DOCKER_IMAGE:-ghcr.io/euro-office/documentserver}:${EURO_OFFICE_DOCKER_TAG:-latest} + # changelog https://github.com/EURO-office/DocumentServer/releases + networks: + opencloud-net: + environment: + WOPI_ENABLED: "true" + # self-signed certificates + USE_UNAUTHORIZED_STORAGE: "${INSECURE:-false}" + volumes: + # Mount local TrueType fonts so the container can use system fonts + # (e.g. Microsoft fonts like Arial, Calibri, Cambria by installing the `ttf-mscorefonts-installer` package). + - /usr/share/fonts/truetype:/usr/share/fonts/truetype/more:ro + logging: + driver: ${LOG_DRIVER:-local} + restart: always + healthcheck: + test: + [ + "CMD", + "bash", + "-c", + "exec 3<>/dev/tcp/127.0.0.1/80 && printf 'GET /hosting/discovery HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | head -1 | grep -q '200 OK'" + ] + interval: 30s + timeout: 10s + retries: 5 + start_period: 120s