== Description == This container runs the owncloud application, which is a PHP based filesharing and storage service. The PHP application is run through mod_php and ports 80 and 443 (with a self signed certificate) are exposed. == Dependencies == === Databases === For development and testing puposes it is possible to run owncloud against an embedded sqlite database. For production usage it's highly recommended to provide a mysql or postgresql database the container can access. This could be from another container and linking them up, or it could be a dedicated database host. === Systemd === This is a systemd based container so that reaping of PHP processes, and similar, are handled correctly. To run this container one of the two requirements must be met: * The host must have oci-systemd-hook installed * The run command must mount /tmp as tmpfs and mount cgroups: `docker run -P -d --tmpfs /run --tmpfs /tmp -v /sys/fs/cgroup:/sys/fs/cgroup owncloud` == Volumes == === Mandatory === This container mandates two volumes: * /etc/owncloud - This contains persistent owncloud configuration data that must not be lost on upgrades * /var/lib/owncloud - This contains the persistent user data that must not be lost on upgrades It is advisable to run these with known names for these volumes: `docker run -P -d -v owncloud-data:/var/lib/owncloud -v owncloud-config:/var/lib/owncloud owncloud` === Optional === The included httpd server uses a self signed certificate. If using in a 'production' situation it's suggested to change this. To do so make /etc/httpd/conf.d a volume and update the SSL configuration to point to an appropriate key and certificate. It's suggested that these are stored in a volume as well, for example /etc/httpd/certs, in order to protect them on update. == Upgrading the container == When the owncloud application gets an update a maintenance task needs to be run manually to update database schemas. This will be explained on connection to the webapp and can be run from the webapp itself. For large instances or any troubleshooting situation it's advised to carry out the update via the CLI against the running container. `docker exec -it owncloud-name sudo -u apache php /usr/share/owncloud/occ upgrade`