ReinerNippes / nextcloud_on_docker

Run Nextcloud in Docker Container on various Linux Hosts
MIT License
203 stars 48 forks source link

Onlyoffice with apache image #44

Closed ghost closed 4 years ago

ghost commented 4 years ago

When using the latest apache image for nextcloud, the following error occurs ONLYOFFICE cannot be reached. Please contact admin.

How would I go about solving this?

ReinerNippes commented 4 years ago

You would have to follow this guide: https://helpcenter.onlyoffice.com/de/server/document/document-server-proxy.aspx and add the according labels to the onlyoffice container. So traefik would route the traffic to onlyoffice. Right now this is done by nginx.

ghost commented 4 years ago

Ok. So instead of: https://github.com/ReinerNippes/nextcloud_on_docker/blob/master/roles/docker_container/templates/traefik.toml.j2#L29

Use the backend provided here? https://github.com/ONLYOFFICE/document-server-proxy/blob/master/traefik/minimal.toml#L8

and provide the onlyoffice container with the aliase https://github.com/ONLYOFFICE/document-server-proxy/blob/master/tests/traefik/minimal/docker-compose.yaml#L10 ?

ReinerNippes commented 4 years ago

More or less. Yes.

In my setup traefik is configured with labels. So you have to "convert" the settings from the toml files to container labels. Examples here: https://github.com/ReinerNippes/nextcloud_on_docker/blob/00488c7b970bec55374d451d4afa96b7216d3700/roles/docker_container/tasks/nginx.yml#L35

If you don't have a extra domain you may look at the "proxy-to-virtual-path" config. https://github.com/ONLYOFFICE/document-server-proxy/blob/master/traefik/proxy-to-virtual-path.toml

And you have to adjust the nextcloud configuration: https://github.com/ReinerNippes/nextcloud_on_docker/blob/00488c7b970bec55374d451d4afa96b7216d3700/roles/nextcloud_config/tasks/configure_onlyoffice.yml#L16