nextcloud / docker

⛴ Docker image of Nextcloud
https://hub.docker.com/_/nextcloud/
GNU Affero General Public License v3.0
5.87k stars 1.81k forks source link

collabora example #223

Open beda17 opened 6 years ago

beda17 commented 6 years ago

Dear community,

I have an feature request - collabora examples.

It would be very kind, if some of you could make an collabora docker-compose example and help us the hobbyists. It's not a new question on the internet and I'm trying to set it up using the fpm image for some months myself. I even extra signed up for this feature request.

Thank you in advanced.

J0WI commented 6 years ago

There are: https://nextcloud.com/collaboraonline/ https://icewind.nl/entry/collabora-online/

beda17 commented 6 years ago

Thank you J0WI for your reply. Unfortunately are the examples you have sent with a normal installation in mind. Using the nginx-proxy defaults, see bellow, I am getting an OK using the collabora_subdomain.domain.org and Time out in nextcloud. According to the nginx proxy it is possible to add custom configurations, like the one in your link. I wasn't successful but lets say you work it out, then there is the question how with the nginx-proxy letsencrypt companion. I am using the docker-compose.yml enhanced by my collabora part

collabora-code:
    image: collabora/code
    expose:
      - 9980
    environment:
      - VIRTUAL_HOST=collabora_subdomain.domain.org
      - VIRTUAL_PORT=9980
      - VIRTUAL_PROTO=https
      - LETSENCRYPT_HOST=collabora_subdomain.domain.org
      - LETSENCRYPT_EMAIL=letsencrypt@email.addr
      - domain=nextcloud_subdomain\\.domain\\.org
    restart: always
    cap_add:
      - ALL
    networks:
      - proxy-tier

nginx-proxy documentation

Thank you in advanced.

aaronSkar commented 5 years ago

Ok so what exactly do you want to accomplish? You need an example of a docker-compose.yml file that uses nginx, nextcloud, maria db and the lets encrypt companion with persistant data? Or are you that far and are are trying to add additional/unrelated to nextcloud custom hosts behind your nginx reverse proxy docker?

beda17 commented 5 years ago

An example with a working collabora/code container. Collabora is partner of Nextcloud and their self-hosted online document editing platform is now incorporated in the nextcloud mobile app.

I do have "a docker-compose.yml file that uses nginx, nextcloud, maria db and the lets encrypt companion with persistant data". I just cannot get the collabora container working.

aaronSkar commented 5 years ago

Ok i have a docker-compose file that has everything working including collabora office. Ill strip out specific password info and upload it tonight.

beda17 commented 5 years ago

First of all thank you for your time!

While trying to reproduce your configuration I am getting: "Saved with error: Collabora Online should use the same protocol as the server installation." I am using the fpm image can it be the issue?

aaronSkar commented 5 years ago

OK that might be related to the fpm image. Ill see if I can reproduce that. Did you try to edit a document and see if it works anyways?

beda17 commented 5 years ago

Just solved it with 'overwriteprotocol' => 'https' in config.php. Back to "504 Gateway Time-out" when I edit a document. Logs as expected:

GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to office.mmyserver.duckdns.org port 443: Connection timed out (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

aaronSkar commented 5 years ago

OK that makes sense. You need to add the overwriteprotocol when using a reverse proxy for https in nextcloud for apps to work right. I can add a note to the example for that.

What happens if you just browse to https://office.mmyserver.duckdns.org? You should get a basic page that says OK in the top left if collabora and the reverse proxy is running properly. Or is office.mmyserver.duckdns.org your actually collabora instance? If so it seems to not be working properly though the reverse proxy as it doesn't have the letsencrypt cert.

Something like this: image

healthsyscn commented 5 years ago

@aaronSkar Thanks for putting up your docker-compose file. It is very helpful.

I am also running into the same issue that @beda17 has mentioned. Modifying the nextcloud config.php file allows me to save the collabora domain successfully but I am still getting a "Failed to load Collabora Online - please try again later" error when trying to load a document.

The collabora instance and reverse proxy seems to be working well since I get the "ok" message when browsing directly to it.

beda17 commented 5 years ago

@aaronSkar It is my real domain. I must have forgotten to anonymize it. I always spin down the collabora container when I'm finished experimenting.

I am getting to the "OK" page. Even the admin settings page is working. Most of the instructions are mentioning port 9980, but neither changing the port helped me in the past.

Further experimenting I tried binding it to the host localhost, connecting to it using my own dns as well as from the internet.