Docker-DocumentServer icon indicating copy to clipboard operation
Docker-DocumentServer copied to clipboard

Documentation-extension on configuration for variables

Open aignerat opened this issue 4 years ago • 4 comments

Do you want to request a feature or report a bug? feature

What is the current behavior? Documentserver Configuration is hardcoded - Especially on the publically known storage-Secret-Key "verysecretkey"

What is the expected behavior? Documentation on how to change Config-Values in the recommended way (most probably ENV).

DocumentServer Docker tag: Documentation

Host Operating System: Centos 7 (irrelevant)

aignerat avatar Oct 14 '21 10:10 aignerat

I think we do not have enough resources to make all values configurable via ENV since there are hundreds of them

We make all most popular and they described here

I think if you want to be able to configure more - it's two ways

  1. Mount /etc/onlyoffice/documentserver/local.json as volume from the host system and make all necessary changes
  2. Replace it via json command after starting the container in some additional startup script like this
docker exec -it DocumentServer /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.autoAssembly.enable=true'

ShockwaveNN avatar Oct 14 '21 11:10 ShockwaveNN

are you sure that the storage-secret doesnt need to be changed inside the nginx config (/etc/onlyoffice/documentserver/nginx/includes/ds-docservice.conf)?

i think so. This is a dissatisfying solution for me because then you also need to mount the nginx config file out of the container.

Mr-Philipp avatar Oct 14 '21 12:10 Mr-Philipp

Ok, I've got you You've meant this string https://github.com/ONLYOFFICE/document-server-package/blob/2c204bd51ba1118f2715fe9a7d58cfd2286a7a76/common/documentserver/nginx/includes/ds-docservice.conf.m4#L43

I see your problem and created issue 53170 for implementing this ability, so set this string via ENV and hard-coding this string is not a good idea

But until we fix it - you should use docker exec method to replace it

ShockwaveNN avatar Oct 14 '21 14:10 ShockwaveNN

We added ability to specify this secret via ENV https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/444

It will be released in next major release, v7.2.0

ShockwaveNN avatar Jun 16 '22 10:06 ShockwaveNN

DocumentServer v7.2 is released. This issue should be fixed

Feel free to comment or reopen it if you got further questions

ShockwaveNN avatar Sep 23 '22 16:09 ShockwaveNN