[GH-ISSUE #395] Allow to set file limits via env-file #202

Open
opened 2026-02-26 10:30:57 +03:00 by kerem · 3 comments
Owner

Originally created by @xvybihal on GitHub (Dec 8, 2021).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/395

Do you want to request a feature or report a bug?
This is feature request.

What is the current behavior?
Currently the limits are hardcoded in container inside of conf files. For example /etc/onlyoffice/documentserver/default.json file.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
See #354 for suggestion how they can be changed.

What is the expected behavior?
My suggestion is to add the ability to set those limits via env-file, instead of mangling .conf and .json files inside of the container. I propose names:

NGINX_CLIENT_MAX_BODY_SIZE
MAX_FILE_SIZE
MAX_DOWNLOAD_BYTES
INPUT_LIMIT_UNCOMPRESSED_DOC
INPUT_LIMIT_UNCOMPRESSED_XLS
INPUT_LIMIT_UNCOMPRESSED_PPT

So the settings could be done using environment variables like this:

NGINX_CLIENT_MAX_BODY_SIZE=100M
MAX_FILE_SIZE=104857600
MAX_DOWNLOAD_BYTES=104857600
INPUT_LIMIT_UNCOMPRESSED_DOC=50MB
INPUT_LIMIT_UNCOMPRESSED_XLS=300MB
INPUT_LIMIT_UNCOMPRESSED_PPT=50MB
Originally created by @xvybihal on GitHub (Dec 8, 2021). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/395 **Do you want to request a *feature* or report a *bug*?** This is feature request. **What is the current behavior?** Currently the limits are hardcoded in container inside of conf files. For example `/etc/onlyoffice/documentserver/default.json` file. **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.** See #354 for suggestion how they can be changed. **What is the expected behavior?** My suggestion is to add the ability to set those limits via env-file, instead of mangling .conf and .json files inside of the container. I propose names: `NGINX_CLIENT_MAX_BODY_SIZE` `MAX_FILE_SIZE` `MAX_DOWNLOAD_BYTES` `INPUT_LIMIT_UNCOMPRESSED_DOC` `INPUT_LIMIT_UNCOMPRESSED_XLS` `INPUT_LIMIT_UNCOMPRESSED_PPT` So the settings could be done using environment variables like this: ``` NGINX_CLIENT_MAX_BODY_SIZE=100M MAX_FILE_SIZE=104857600 MAX_DOWNLOAD_BYTES=104857600 INPUT_LIMIT_UNCOMPRESSED_DOC=50MB INPUT_LIMIT_UNCOMPRESSED_XLS=300MB INPUT_LIMIT_UNCOMPRESSED_PPT=50MB ```
Author
Owner

@ShockwaveNN commented on GitHub (Dec 8, 2021):

Thank you for your idea

I've created issue 54440 in our private issue tracker to discuss this feature with our team

<!-- gh-comment-id:988720919 --> @ShockwaveNN commented on GitHub (Dec 8, 2021): Thank you for your idea I've created issue 54440 in our private issue tracker to discuss this feature with our team
Author
Owner

@alexwoo-awso commented on GitHub (Jul 31, 2022):

Hi, just finished with my solution to this.
Check it out, please.
https://hub.docker.com/repository/docker/alexwoo42/documentserver-ee/general

Dockerfile:
Dockerfile.txt

run-document-server.sh:
run-document-server.sh.txt

<!-- gh-comment-id:1200512790 --> @alexwoo-awso commented on GitHub (Jul 31, 2022): Hi, just finished with my solution to this. Check it out, please. https://hub.docker.com/repository/docker/alexwoo42/documentserver-ee/general Dockerfile: [Dockerfile.txt](https://github.com/ONLYOFFICE/Docker-DocumentServer/files/9229825/Dockerfile.txt) run-document-server.sh: [run-document-server.sh.txt](https://github.com/ONLYOFFICE/Docker-DocumentServer/files/9229822/run-document-server.sh.txt)
Author
Owner

@ScionOfDesign commented on GitHub (Oct 7, 2022):

Hi, just finished with my solution to this. Check it out, please. https://hub.docker.com/repository/docker/alexwoo42/documentserver-ee/general

Dockerfile: Dockerfile.txt

run-document-server.sh: run-document-server.sh.txt

Thank you! This saves me a lot of annoying work. I hope this issue gets resolved soon.

<!-- gh-comment-id:1271262437 --> @ScionOfDesign commented on GitHub (Oct 7, 2022): > Hi, just finished with my solution to this. Check it out, please. https://hub.docker.com/repository/docker/alexwoo42/documentserver-ee/general > > Dockerfile: [Dockerfile.txt](https://github.com/ONLYOFFICE/Docker-DocumentServer/files/9229825/Dockerfile.txt) > > run-document-server.sh: [run-document-server.sh.txt](https://github.com/ONLYOFFICE/Docker-DocumentServer/files/9229822/run-document-server.sh.txt) Thank you! This saves me a lot of annoying work. I hope this issue gets resolved soon.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#202
No description provided.