diff --git a/templates/nextcloud/0/docker-compose.yml b/templates/nextcloud/0/docker-compose.yml new file mode 100644 index 0000000..b252977 --- /dev/null +++ b/templates/nextcloud/0/docker-compose.yml @@ -0,0 +1,46 @@ +version: '2' + +services: + + nextcloud: + image: nextcloud:12-apache + volumes_from: + - nextcloud-data + ports: + - ${NEXTCLOUD_PORT}:80 + labels: + io.rancher.sidekicks: nextcloud-data + io.rancher.container.hostname_override: container_name + + nextcloud-data: + image: nextcloud:12-apache + entrypoint: + - /bin/true + volumes: + - /var/www/html + labels: + io.rancher.container.start_once: 'true' + io.rancher.container.hostname_override: container_name + + mariadb: + image: mariadb:10 + environment: + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASS} + MYSQL_DATABASE: ${MYSQL_DATABASE} + MYSQL_USER: ${MYSQL_USER} + MYSQL_PASSWORD: ${MYSQL_PASS} + labels: + io.rancher.sidekicks: mariadb-data + io.rancher.container.hostname_override: container_name + + mariadb-data: + image: mariadb:10 + entrypoint: + - /bin/true + volumes: + - /var/lib/mysql + tty: true + labels: + io.rancher.container.start_once: 'true' + io.rancher.container.hostname_override: container_name + diff --git a/templates/nextcloud/0/rancher-compose.yml b/templates/nextcloud/0/rancher-compose.yml new file mode 100644 index 0000000..804707c --- /dev/null +++ b/templates/nextcloud/0/rancher-compose.yml @@ -0,0 +1,50 @@ +version: '2' + +catalog: + + name: nextcloud + version: 0.0.1 + description: Nextcloud - Enterprise File Sync and Share + questions: + - variable: NEXTCLOUD_PORT + label: Port + default: 80 + required: true + type: int + - variable: MYSQL_ROOT_PASS + label: MySQL root password + required: true + type: password + - variable: MYSQL_DATABASE + default: nextcloud + label: MySQL Database + required: true + type: string + - variable: MYSQL_USER + default: nextcloud + label: MySQL User + required: true + type: string + - variable: MYSQL_PASS + label: MySQL Pass + required: true + type: password + +services: + + nextcloud: + scale: 1 + start_on_create: true + + nextcloud-data: + scale: 1 + start_on_create: true + + mariadb: + scale: 1 + start_on_create: true + + mariadb-data: + scale: 1 + start_on_create: true + diff --git a/templates/nextcloud/README.md b/templates/nextcloud/README.md new file mode 100644 index 0000000..6581bd8 --- /dev/null +++ b/templates/nextcloud/README.md @@ -0,0 +1,22 @@ +# NextCloud + +Enterprise File Sync and Share + +## Configuration + +When you start Nextcloud for the first time you will see the [Installation Wizard](https://docs.nextcloud.com/server/12/admin_manual/installation/installation_wizard.html). + +1.) Point your Web browser to your Nextcloud Installation and enter your [Username / Password](https://docs.nextcloud.com/server/12/admin_manual/installation/installation_wizard.html#quick-start). + +2.) We persist the [Data Directory Location](https://docs.nextcloud.com/server/12/admin_manual/installation/installation_wizard.html#data-directory-location) from `/var/www/html/data` to a Sidekick Container. *(If you don't change the location there is nothing else to do. In case you want to use another directory you have to update the volumes entry for the `nextcloud-data` service in `docker-compose.yml`.)* + +3.) The last step is to update the [Database Settings](https://docs.nextcloud.com/server/12/admin_manual/installation/installation_wizard.html#database-choice) and switch from SQLite to MariaDB for better performance. + +- Database: `YOUR-DATABASE` (default: `nextcloud`) +- MySQL Username: `YOUR-USER` (default: `nextcloud`) +- MySQL Password: `YOUR-PASSWORD` +- MySQL Hostname: `mariadb` (**Important:** Use `mariadb` instead of `localhost`) + +Read more in the official [Nextcloud Documentation](https://docs.nextcloud.com/). + + diff --git a/templates/nextcloud/catalogIcon-nextcloud.svg b/templates/nextcloud/catalogIcon-nextcloud.svg new file mode 100644 index 0000000..628c953 --- /dev/null +++ b/templates/nextcloud/catalogIcon-nextcloud.svg @@ -0,0 +1,103 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/templates/nextcloud/config.yml b/templates/nextcloud/config.yml new file mode 100644 index 0000000..96d3e76 --- /dev/null +++ b/templates/nextcloud/config.yml @@ -0,0 +1,7 @@ +name: nextcloud +description: Enterprise File Sync and Share +version: 0.0.1 +category: File Synchronisation +maintainer: Maik Ellerbrock +projectURL: https://github.com/ellerbrock/rancher-collection + diff --git a/templates/nextcloud/run.sh b/templates/nextcloud/run.sh new file mode 100755 index 0000000..e27ec32 --- /dev/null +++ b/templates/nextcloud/run.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +rancher-compose rm -f && rancher-compose up +