tiredofit / docker-collabora-online

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

libreoffice container runs, reachable on internal network :9980, but traefik doesn't connect #6

Closed joergmschulz closed 4 years ago

joergmschulz commented 4 years ago

While I specified

in the labels for the libreoffice machine, traefik insists on directing traffic to http://192.168.176.4:1025

How can it happen that traefik ignores the port definition???

tiredofit commented 4 years ago

That I have no idea. Here's my labels as an example (Traefik 1.7.20, I haven't upgraded to 2.x)

      - traefik.enable=true
      - traefik.frontend.rule=Host:libreoffice.example.com
      - traefik.port=9980
      - traefik.protocol=http
      - traefik.docker.network=proxy
      - traefik.backend=libreoffice-app
joergmschulz commented 4 years ago

this might explain why your config isn't working for me. Now I am trying

Looks good. My nextcloud can find something here (and breaks, but that's to be expected), now the real work begins - setting all these ENVparameters and switches that allow the collabora thing to be used behind the traefik reverse proxy. Thank you for your hint and your work.

tiredofit commented 4 years ago

Not a problem. FWIW this should get you up and running immediately as a starting point:

      - ALLOWED_HOSTS=^(.*)\.domain\.org
      - ENABLE_TLS=FALSE
      - ENABLE_TLS_REVERSE_PROXY=FALSE
joergmschulz commented 4 years ago

exactly. Additionally:

hostname: libreoffice.domain.com

// and, if this domain name deviates from your nextcloud domain name, you must disable certificate checking. // Edit: this isn't correct. you only have to include the correct fullchain in traefik if you're using your own certificates.

Congratulations, and thank you again. Would it be good to add this remark to the example docker-compose.yaml? If yes, I'd create a PR.

Next, I will try to add fonts. If successful, I'll create some PRs. Also a more recent LO version is outstanding. yours crashes when filenames contain a % sign.

tiredofit commented 4 years ago

I'm happy to take PR's on anything! Fonts should be fairly easy, and as a hint, it happens in the 2nd stage of building the image. You'll have to experiment with the right build of LO and LOOL - it can get tricky. I spent quite a long time getting this one to work properly without falling apart. I think the biggest time suck on this is trying to clone the libreoffice repositories which takes the majority of the time. Compiling on a 16 core system goes pretty quick!

joergmschulz commented 4 years ago

see also activities here: https://github.com/husisusi/officeonlin-install.sh/issues/188#issuecomment-577703558

tiredofit commented 4 years ago

See my develop branch for latest updates - I am stalling out at the LOOL build for some unknown reason when upgrading to Node 10, Buster, and new LOOL versions. At this time its a side project to get going as current version is suiting me fine, but if you were thinking of adding to the image this is the most up to date WIP

joergmschulz commented 4 years ago

Studying this beast as well, I think I'll have a working compile in some days. Not only nodejs is an issue, also the compile flag --disable-werror for loleaflet.

joergmschulz commented 4 years ago

looks good, nearly ready to commit a pull request (just draw back one). will start to test tonight.

But, yet, I can't get further than LOOLWSD 4.0.4 (git hash: a2132266)

Edit:

For that version I could provide a Dockerfile. But we couldn't work a long time with that one because:

for more recent versions, strange errors come up during the internationalization;
Currently I'm trying to fall back to the build script provided on the LO site:

https://gerrit.libreoffice.org/plugins/gitiles/online/+/refs/heads/master/docker