Setup Collabora Code with docker compose on Azure

We are trying to setup a Collabora CODE to deploy on Azure. We are using docker-compose and we are getting an error while connecting to the websocket

docker-compose.yaml:

version: '3'
 
services:
  wopi-client:
    image: collabora/code:latest
    container_name: wopi-client
    expose:
      - 9980
    ports:
      - 9980:9980
    environment:
      - username=<username>
      - password=<password>
      - server_name=collabora-code.domain.com
      - domain=wopi\.host-api\.domain
      - DONT_GEN_SSL_CERT=1
      - extra_params=--o:net.frame_ancestors=frontend.domain --o:ssl.termination=true --o:ssl.enable=false --o:logging.level=trace
    restart: always
    volumes:
      - "${SOME_STORAGE_IN_AZURE}/libre-office/ca-chain.cert.pem:/etc/coolwsd/ca-chain.cert.pem"
      - "${SOME_STORAGE_IN_AZURE}/libre-office/key.pem:/etc/coolwsd/key.pem"
      - "${SOME_STORAGE_IN_AZURE}/libre-office/cert.pem:/etc/coolwsd/cert.pem"

We get this screen:
image

And a console error that doesn’t provide any info at all, it just says “can’t connect to wss://”

Can anybody help me with this?

Hello @Gustavo Welcome to collabora online forums.

I have seen this issue in some forum topics, yes here it is Failure after CODE update to 23.05.8.4 deb Package

Try solution mentioned in above topic them let me know if it works or not might be other configuration error on reverse proxy.

ATB,
Darshan

Also - it might be worth enabling:

<hexify_embedded_urls desc="Enable to protect encoded URLs from getting decoded by intermediate hops. Particularly useful on Azure deployments" type="bool" default="false"></hexify_embedded_urls>

and testing that - I’m not sure it gets a lot of love; but in the past we’ve seen Azure proxies and ingress points essentially mangling the WOPISRC URLs as they go past which creates a lot of problems :slight_smile:

Would be interested to hear how that goes.

Hi, thank you so much for replying! We are deploying via Docker compose, how would one uninstall and install again - as suggested in the topic’s accepted answer - in this situation?

Hi @mmeeks, thanks for the suggestion! I’ll ask the guys that are handling the deployment to add --o:hexify_embedded_urls=true to the extra_params and let you know the results

Edit: It worked! Thank you so much @mmeeks!

Unrelated question, should I keep ssl disabled and let azure handle https or should I set ssl.enable=true and ssl.termination=false?

Depends on your use-case; what is that ? ultimately getting someone else to do SSL unwrap and distributing load between multiple containers would be normal for a large setup.

1 Like