nextcloud: add new app
Nextcloud has long been a desired app for FreedomBox, however, due to difficulties around Debian packaging, it hasn't yet been implemented. This branch creates an app for Nextcloud with the help of Podman. Podman is a containerization technology, like Docker, but with some extra features that make its integration into FreedomBox convenient. If the podman approach turns out to be favorable, we should consider writing a podman specific module.
How does this work?
The app installs the podman and default-mysql-server Debian packages. In other apps, such as MediaWiki, FreedomBox chooses SQLite which eases maintenance and backup/restore. However, this would bring a significant performance degrade for Nextcloud, hence the choice of Mysql. Other apps, like Wordpress already use Mysql, so it is installed on the host as opposed to installing it in a sepatate container. A firewalld rich rule is created, so the Nextcloud container can communicate with the db and OpenLDAP.
The podman package comes with a systemd service and timer for automatically upgrading containers that are labeled as "io.containers.autoupdate=registry". podman-auto-update.timer is managed by FreedomBox. We might add a drop-in file for the timer to make it more consistent with unattended-upgrades.
Podman natively supports creating systemd services for individual containers. The generated systemd service is then managed by FreedomBox.
The current container image is based on Debian and runs apache inside the container. To avoid running apache redundantly (both on the host and inside the container) it would be preferable to use the nextcloud:stable-fpm image instead, which seems to require creating a new virtual host.
To-do:
- Add a warning explaining that Nextcloud comes from outside Debian.
- Come up with a better way to handle the firewall between the container and the host.
Signed-off-by: Benedek Nagy contact@nbenedek.me