ReinerNippes / nextcloud_on_docker

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

Q: Updating System Installed with this Script #75

Closed LinuksGuru closed 3 years ago

LinuksGuru commented 3 years ago

Hi !

I have NextCloud (with self-signed certificate) running as Ubuntu18LTS KVM appliance running under oVirt. Currently planning to migrate to Debian 10 Docker installation made with this great script (also with self-signed certificate + Collabora). Before I would like to understand 2 things:

1) What is proper upgrade method? Pulling docker image, built-in NextCloud upgrade tools or simply re-run this script? 2) I have trusted domains defined as 3 IP addresses - 1 internal LAN + 2 external, in current system defined with trusted_domains variable. Are trusted domains should be defined somewhere in playbook or later with manual edit of config file, in order to be preserved during upgrade process?

Thanks in advance.

ReinerNippes commented 3 years ago

Hi.

  1. built-in NextCloud upgrade <- doesn't work with docker images to my understanding. if you didn't change anything all images will autoupdate. https://github.com/ReinerNippes/nextcloud_on_docker/blob/d2b93016275ff3e4f321179a6833fef020d5a754/roles/docker_container/vars/main.yml#L28 this label tell the watchtower container to check once per day for new images and pull them automatically. worked for me fine. so far. if you don't want this you can define the image version in this file: https://github.com/ReinerNippes/nextcloud_on_docker/blob/d2b93016275ff3e4f321179a6833fef020d5a754/group_vars/all.yml#L20 e.g.: 20-fpm-alpine to stay on nextcloud 20. note: don't change the postgres and fulltextsearch images to latest. postgres doesn't auto upgrade from major numbers and the fulltextsearch images my not be compatible.

  2. you want to access nextcloud through three domains? example.com, example.org, example.tld yon can add trusted domains here: https://github.com/ReinerNippes/nextcloud_on_docker/blob/d2b93016275ff3e4f321179a6833fef020d5a754/roles/nextcloud_config/defaults/main.yml#L6 but more important tell traefik to route more then one domain here: https://github.com/ReinerNippes/nextcloud_on_docker/blob/a0c91eff87c44c5598156ff22ed6e1d35e10685f/roles/docker_container/tasks/nginx.yml#L38 and here https://github.com/ReinerNippes/nextcloud_on_docker/blob/a0c91eff87c44c5598156ff22ed6e1d35e10685f/roles/docker_container/tasks/nginx.yml#L41 the statement has to look like:

    traefik.http.routers.nginx.rule: "Host(`example.com`) || Host(`example.org`) || Host(`example.tld`)

    https://doc.traefik.io/traefik/routing/routers/#rule this applys to the nginx/fpm-php config. you have to define one domain in the inventory still because the variable nextcloud_server_fqdn is used for portainer and adminer.

LinuksGuru commented 3 years ago

Fixed with 1 trusted domain and IP switching with router/DNS.