tiredofit / docker-collabora-online

Dockerized Online Office Suite with customizable options
MIT License
80 stars 27 forks source link

server name is hash #12

Closed hmt closed 3 years ago

hmt commented 3 years ago

I've set up your docker image as a vpath along my nextcloud vhost:

nextcloud.domain.com
nextcloud.domain.com/lool

It seems to work because I can reach the admin console (slightly messed up because of l10 error messages but nontheless) However, the url that I set to forward all my requests are turned into the hash that is stored in /etc/loolwsd/loolwsd.xml under <server_name>. So all requests fail and look like this: https://b40e55c32789/loleaflet/44a46d78c/loleaflet.html?WOPISrc=https%3A%2F%2.......

adroslice commented 3 years ago

I'm having the same issue. I have a slightly different setup since I prefer LXC, so my docker-compose.yml looks like this:

version: '3.3'
services:
  libreoffice-app:
    image: tiredofit/libreoffice-online
    container_name: libreoffice-app
    ports:
      - "9980:9980"
    cap_add:
      - MKNOD
    environment:
      - VIRTUAL_HOST=REDACTED
      - VIRTUAL_NETWORK=nginx-proxy
      - VIRTUAL_PORT=9980
      - VIRTUAL_PROTO=https
      - LETSENCRYPT_HOST=REDACTED
      - LETSENCRYPT_EMAIL=techsupport@REDACTED

      - ZABBIX_HOSTNAME=libreoffice-app

      - ADMIN_USER=REDACTED
      - ADMIN_PASS=REDACTED
      - ALLOWED_HOSTS=REDACTED
      - DICTIONARIES="en_GB en_US"
      - LOG_LEVEL=warning
adroslice commented 3 years ago

It's worth noting that, with no persistent storage set up, this hash changes on every restart. This hash-as-host problem shows up in server-domain/hosting/discovery, proving that it's a problem with the container. When I attempted a manual build/install on an LXC container based on the commands listed in the dockerfile before I grabbed the docker image itself, I did not have this problem. (Obviously there were other issues, otherwise I wouldn't be here)

adroslice commented 3 years ago

I've just confirmed that it's indeed the container ID.

tiredofit commented 3 years ago

I just updated the examples folder with a way to make your hsotname not be the container hash.

In short just add hostname: libreoffice.example.com and it will relay the proper address going forward :)

adroslice commented 3 years ago

Thanks a lot, that resolves the issue for me.