From 77dae5ac0bde4ce23544e7195f4872e730e2a16e Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Thu, 2 Mar 2023 15:54:53 +0100 Subject: [PATCH] increase allowed file size in onlyoffice --- .../config/onlyoffice/entrypoint-override.sh | 7 ++ .../ocis_wopi/config/onlyoffice/local.json | 71 +++++++++++++++++++ .../examples/ocis_wopi/docker-compose.yml | 8 ++- 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100755 deployments/examples/ocis_wopi/config/onlyoffice/entrypoint-override.sh create mode 100755 deployments/examples/ocis_wopi/config/onlyoffice/local.json diff --git a/deployments/examples/ocis_wopi/config/onlyoffice/entrypoint-override.sh b/deployments/examples/ocis_wopi/config/onlyoffice/entrypoint-override.sh new file mode 100755 index 0000000000..60179dfe8e --- /dev/null +++ b/deployments/examples/ocis_wopi/config/onlyoffice/entrypoint-override.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +# we can't mount it directly because the run-document-server.sh script wants to move it +cp /etc/onlyoffice/documentserver/local.dist.json /etc/onlyoffice/documentserver/local.json + +/app/ds/run-document-server.sh diff --git a/deployments/examples/ocis_wopi/config/onlyoffice/local.json b/deployments/examples/ocis_wopi/config/onlyoffice/local.json new file mode 100755 index 0000000000..0db571fad4 --- /dev/null +++ b/deployments/examples/ocis_wopi/config/onlyoffice/local.json @@ -0,0 +1,71 @@ +{ + "services": { + "CoAuthoring": { + "sql": { + "type": "postgres", + "dbHost": "localhost", + "dbPort": "5432", + "dbName": "onlyoffice", + "dbUser": "onlyoffice", + "dbPass": "onlyoffice" + }, + "token": { + "enable": { + "request": { + "inbox": true, + "outbox": true + }, + "browser": true + }, + "inbox": { + "header": "Authorization" + }, + "outbox": { + "header": "Authorization" + } + }, + "secret": { + "inbox": { + "string": "B8LjkNqGxn6gf8bkuBUiMwyuCFwFddnu" + }, + "outbox": { + "string": "B8LjkNqGxn6gf8bkuBUiMwyuCFwFddnu" + }, + "session": { + "string": "B8LjkNqGxn6gf8bkuBUiMwyuCFwFddnu" + } + } + } + }, + "rabbitmq": { + "url": "amqp://guest:guest@localhost" + }, + "FileConverter": { + "converter": { + "inputLimits": [ + { + "type": "docx;dotx;docm;dotm", + "zip": { + "uncompressed": "1GB", + "template": "*.xml" + } + }, + { + "type": "xlsx;xltx;xlsm;xltm", + "zip": { + "uncompressed": "1GB", + "template": "*.xml" + } + }, + { + "type": "pptx;ppsx;potx;pptm;ppsm;potm", + "zip": { + "uncompressed": "1GB", + "template": "*.xml" + } + } + ] + } + } + +} diff --git a/deployments/examples/ocis_wopi/docker-compose.yml b/deployments/examples/ocis_wopi/docker-compose.yml index d3f3c285ad..d14c1f8bef 100644 --- a/deployments/examples/ocis_wopi/docker-compose.yml +++ b/deployments/examples/ocis_wopi/docker-compose.yml @@ -199,9 +199,15 @@ services: image: onlyoffice/documentserver:7.3.0 networks: ocis-net: + entrypoint: + - /bin/sh + - /entrypoint-override.sh environment: WOPI_ENABLED: "true" USE_UNAUTHORIZED_STORAGE: "${INSECURE:-false}" # self signed certificates + volumes: + - ./config/onlyoffice/entrypoint-override.sh:/entrypoint-override.sh + - ./config/onlyoffice/local.json:/etc/onlyoffice/documentserver/local.dist.json labels: - "traefik.enable=true" - "traefik.http.routers.onlyoffice.entrypoints=https" @@ -209,7 +215,7 @@ services: - "traefik.http.routers.onlyoffice.tls.certresolver=http" - "traefik.http.routers.onlyoffice.service=onlyoffice" - "traefik.http.services.onlyoffice.loadbalancer.server.port=80" - # websockets can't be opend when this is ommitted + # websockets can't be opened when this is ommitted - "traefik.http.middlewares.onlyoffice.headers.customrequestheaders.X-Forwarded-Proto=https" - "traefik.http.routers.onlyoffice.middlewares=onlyoffice" logging: