CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.85k stars 704 forks source link

Use of domain variable is not supported #4594

Closed tuxfy closed 2 years ago

tuxfy commented 2 years ago

Describe the bug The env variable domain is not working anymore. I starting with these error for people who run in this issue after an update of docker images and containers.

To Reproduce Steps to reproduce the behavior:

docker-compose.yml before

services:
  collabora:
    image: collabora/code:21.11.3.6.1
    restart: always
    container_name: collabora
    cap_add:
      - MKNOD
    ports:
      - 9980:9980
    environment:
      - domain=nc-domain\\.name\\.com
      - username=
      - password=
      - VIRTUAL_PROTO=https
      - VIRTUAL_PORT=9980
      - VIRTUAL_HOST=
      - LETSENCRYPT_HOST=
      - LETSENCRYPT_EMAIL=

docker-compose.yml after -> switch to aliasgroup

services:
  collabora:
    image: collabora/code:21.11.3.6.1
    restart: always
    container_name: collabora
    cap_add:
      - MKNOD
    ports:
      - 9980:9980
    environment:
      - aliasgroup1=https://domain.name.com:443
      - username=
      - password=
      - VIRTUAL_PROTO=https
      - VIRTUAL_PORT=9980
      - VIRTUAL_HOST=
      - LETSENCRYPT_HOST=
      - LETSENCRYPT_EMAIL=
<wopi desc="Allow/deny wopi storage." allow="true">
            <max_file_size desc="Maximum document size in bytes to load. 0 for unlimited." type="uint">0</max_file_size>
            <locking desc="Locking settings">
                <refresh desc="How frequently we should re-acquire a lock with the storage server, in seconds (default 15 mins) or 0 for no refresh" type="int" default="900">900</refresh>
            </locking>

            <alias_groups desc="default mode is 'first' it allows only the first host when groups are not defined. set mode to 'groups' and define group to allow multiple host and its aliases" mode="groups">
                <group>
                    <host desc="hostname to allow or deny." allow="true">https://domain.name.com:443</host>
                </group>
            </alias_groups>

        </wopi>

Expected behavior

Actual behavior

with env domain: docker logs

-e ERR: Use of domain variable is not supported. First host/domain who tries to connect to COOL is always allowed.
To allow multiple host and its aliases use something like this and pass it as env variable:
aliasgroup1=https://domain1:443,https://its-alias|its-second-alias:443 
aliasgroup2=https://domain2:443,https://its-alias:443 
For more info: https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html

After switching to aliasgroup:

Nextcloud screen after opening a file stays grey.

Desktop (please complete the following information)

Additional context Nextcloud 22.2.6

tuxfy commented 2 years ago

Ok, is working now. Had to add https within the Nextcloud config. So aliasgroup is the solution.