From b36554df163eb95bbccc84e41216b8ab46f9c106 Mon Sep 17 00:00:00 2001 From: notplants Date: Mon, 29 Dec 2025 15:43:05 -0500 Subject: [PATCH] working on onlyoffice+collabora integration --- abra.sh | 1 + compose.yml | 46 ++++++++++++++++++++++++++++++++++++++++++ onlyoffice-config.json | 17 ++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 onlyoffice-config.json diff --git a/abra.sh b/abra.sh index a0e0892..02f711b 100755 --- a/abra.sh +++ b/abra.sh @@ -2,6 +2,7 @@ # Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs export ABRA_ENTRYPOINT_VERSION=v5 export NGINX_CONF_VERSION=v6 +export ONLYOFFICE_CONF_VERSION=v1 export PG_BACKUP_VERSION=v3 environment() { diff --git a/compose.yml b/compose.yml index c989db8..9b8a370 100644 --- a/compose.yml +++ b/compose.yml @@ -59,6 +59,12 @@ x-common-env: &common-env # Collaboration COLLABORATION_API_URL: https://$DOMAIN/collaboration/api/ + # WOPI + WOPI_CLIENTS: "collabora,onlyoffice" + WOPI_COLLABORA_DISCOVERY_URL: "http://collabora:9980/hosting/discovery" + WOPI_ONLYOFFICE_DISCOVERY_URL: "http://onlyoffice/hosting/discovery" + WOPI_SRC_BASE_URL: "http://backend:8000" + x-postgres-env: &postgres-env # Postgresql db container configuration POSTGRES_DB: drive @@ -241,6 +247,43 @@ services: - "traefik.http.middlewares.minio-cors.headers.addVaryHeader=true" - "traefik.http.routers.minio.middlewares=minio-cors" + collabora: + image: collabora/code:latest +# healthcheck: +# test: [ "CMD", "curl", "-f", "http://localhost:9980/hosting/discovery" ] +# interval: 30s +# retries: 5 +# start_period: 60s +# timeout: 10s + networks: + - backend +# ports: +# - "9980:9980" + environment: + - extra_params=--o:ssl.enable=false + - username=drive + - password=password + - server_name=localhost:9980 + - aliasgroup1=app-dev:8000 + + + onlyoffice: + image: onlyoffice/documentserver-de:9.2 +# healthcheck: +# test: [ "CMD", "curl", "-f", "http://localhost/hosting/discovery" ] +# interval: 30s +# retries: 5 +# start_period: 60s +# timeout: 10s + environment: + TZ: "Europe/Berlin" + USE_UNAUTHORIZED_STORAGE: "true" + networks: + - backend + configs: + - source: onlyoffice_conf + target: /etc/onlyoffice/documentserver/local-production-linux.json + web: image: nginx:1.25 configs: @@ -284,6 +327,9 @@ configs: abra_entrypoint: name: ${STACK_NAME}_entrypoint_${ABRA_ENTRYPOINT_VERSION} file: abra-entrypoint.sh + onlyoffice_conf: + name: ${STACK_NAME}_onlyoffice_conf_${ONLYOFFICE_CONF_VERSION} + file: onlyoffice-config.json secrets: django_sk: diff --git a/onlyoffice-config.json b/onlyoffice-config.json new file mode 100644 index 0000000..08e9383 --- /dev/null +++ b/onlyoffice-config.json @@ -0,0 +1,17 @@ +{ + "wopi": { + "enable": true, + "host": "http://localhost:9981", + "pdfView": [], + "pdfEdit": [], + "forms": [], + "wordView": [], + "wordEdit": ["docx", "dotx", "docm"], + "cellView": [], + "cellEdit": ["xlsx", "xlsb", "xltx", "xlsm", "csv"], + "slideView": [], + "slideEdit": ["pptx", "potx", "pptm"], + "diagramView": [], + "diagramEdit": [] + } +} \ No newline at end of file