From 02afb42366f513218b1506526e52757334f91f6b Mon Sep 17 00:00:00 2001 From: stebifan Date: Sat, 23 Jun 2018 14:06:28 +0200 Subject: [PATCH] Add Nextcloud --- templates/nextcloud/0/docker-compose.yml | 106 ++++++++++++++++++ templates/nextcloud/0/rancher-compose.yml | 66 +++++++++++ templates/nextcloud/README.md | 22 ++++ templates/nextcloud/catalogIcon-nextcloud.svg | 103 +++++++++++++++++ templates/nextcloud/config.yml | 6 + templates/wordpress/0/docker-compose.yml | 82 -------------- templates/wordpress/0/rancher-compose.yml | 85 -------------- templates/wordpress/1/docker-compose.yml | 82 -------------- templates/wordpress/1/rancher-compose.yml | 87 -------------- templates/wordpress/README.md | 12 -- templates/wordpress/catalogIcon-wordpress.svg | 21 ---- templates/wordpress/config.yml | 5 - 12 files changed, 303 insertions(+), 374 deletions(-) create mode 100644 templates/nextcloud/0/docker-compose.yml create mode 100644 templates/nextcloud/0/rancher-compose.yml create mode 100644 templates/nextcloud/README.md create mode 100644 templates/nextcloud/catalogIcon-nextcloud.svg create mode 100644 templates/nextcloud/config.yml delete mode 100644 templates/wordpress/0/docker-compose.yml delete mode 100644 templates/wordpress/0/rancher-compose.yml delete mode 100644 templates/wordpress/1/docker-compose.yml delete mode 100644 templates/wordpress/1/rancher-compose.yml delete mode 100644 templates/wordpress/README.md delete mode 100644 templates/wordpress/catalogIcon-wordpress.svg delete mode 100644 templates/wordpress/config.yml diff --git a/templates/nextcloud/0/docker-compose.yml b/templates/nextcloud/0/docker-compose.yml new file mode 100644 index 0000000..49b00b1 --- /dev/null +++ b/templates/nextcloud/0/docker-compose.yml @@ -0,0 +1,106 @@ +version: '2' + +services: + + nextcloud: + build: https://github.com/stebifan/nc-hoffmann-hosting.git + volumes: + - nextcloud:/var/www/html + depends_on: + - db + - web + environment: + POSTGRES_DB: nextcloud + POSTGRES_USER: nextcloud + NC_POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_HOST: db + NEXTCLOUD_ADMIN_USER: admin + NEXTCLOUD_ADMIN_PASSWORD: ${NEXTCLOUD_ADMIN_PASSWORD} + DOMAIN: ${DOMAIN} + links: + - db:db + labels: + io.rancher.container.hostname_override: container_name + io.rancher.container.pull_image: always + + web: + image: hoffmannhosting/nc-hoffmann-hosting-nginx + links: + - nextcloud:app + volumes: + - nextcloud:/var/www/html:ro + depends_on: + - nextcloud + restart: always + labels: + io.rancher.container.hostname_override: container_name + io.rancher.container.pull_image: always + https: yes + + db: + image: postgres + volumes: + - db:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: nextcloud + POSTGRES_USER: nextcloud + labels: + io.rancher.container.hostname_override: container_name + + redirect-https: + image: hoffmannhosting/docker-nginx-https-redirect + labels: + io.rancher.container.hostname_override: container_name + http: yes + depends_on: + - web + + letsencrypt: + image: janeczku/rancher-letsencrypt:v0.5.0 + environment: + API_VERSION: Production + AWS_ACCESS_KEY: '' + AWS_SECRET_KEY: '' + AZURE_CLIENT_ID: '' + AZURE_CLIENT_SECRET: '' + AZURE_RESOURCE_GROUP: '' + AZURE_SUBSCRIPTION_ID: '' + AZURE_TENANT_ID: '' + CERT_NAME: ${DOMAIN} + CLOUDFLARE_EMAIL: '' + CLOUDFLARE_KEY: '' + DNSIMPLE_EMAIL: '' + DNSIMPLE_KEY: '' + DNS_RESOLVERS: 8.8.8.8:53,8.8.4.4:53 + DOMAINS: ${DOMAIN} + DO_ACCESS_TOKEN: '' + DYN_CUSTOMER_NAME: '' + DYN_PASSWORD: '' + DYN_USER_NAME: '' + EMAIL: s.hoffmann@hoffmann-hosting.de + EULA: 'Yes' + GANDI_API_KEY: '' + OVH_APPLICATION_KEY: '' + OVH_APPLICATION_SECRET: '' + OVH_CONSUMER_KEY: '' + PROVIDER: HTTP + PUBLIC_KEY_TYPE: RSA-2048 + RENEWAL_PERIOD_DAYS: '20' + RENEWAL_TIME: '12' + VULTR_API_KEY: '' + volumes: + - /var/lib/rancher:/var/lib/rancher + - zertifikate:/etc/letsencrypt + labels: + io.rancher.container.agent.role: environment + io.rancher.container.create_agent: 'true' + service: letsencrypt + +volumes: + nextcloud: + driver: rancher-nfs + db: + driver: rancher-nfs + zertifikate: + driver: local diff --git a/templates/nextcloud/0/rancher-compose.yml b/templates/nextcloud/0/rancher-compose.yml new file mode 100644 index 0000000..6f08017 --- /dev/null +++ b/templates/nextcloud/0/rancher-compose.yml @@ -0,0 +1,66 @@ +version: '2' + +catalog: + + name: nextcloud + version: 13.0.2 + description: Nextcloud - Enterprise File Sync and Share + questions: + - variable: POSTGRES_PASSWORD + label: PostreSQL password + required: true + type: password + - variable: NEXTCLOUD_ADMIN_PASSWORD + label: Nextcloud Admin Password + required: true + type: password + - variable: DOMAIN + default: your-domain.de + label: Domain + required: true + type: string + + +services: + + nextcloud: + scale: 1 + start_on_create: true + + db: + scale: 1 + start_on_create: true + + redirect-https: + scale: 1 + start_on_create: true + lb_config: + port_rules: + - target_port: 80 + hostname: ${DOMAIN} + + web: + scale: 1 + start_on_create: true + lb_config: + port_rules: + - target_port: 80 + hostname: ${DOMAIN} + health_check: + healthy_threshold: 2 + response_timeout: 2000 + port: 80 + unhealthy_threshold: 3 + initializing_timeout: 1000 + interval: 2000 + strategy: recreate + request_line: 'GET "/" "HTTP/1.1\r\nHost: ${DOMAIN}"' + reinitializing_timeout: 1000 + + letsencrypt: + scale: 1 + start_on_create: true + lb_config: + port_rules: + - target_port: 80 + hostname: ${DOMAIN} \ No newline at end of file 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..d0011e9 --- /dev/null +++ b/templates/nextcloud/config.yml @@ -0,0 +1,6 @@ +name: Nextcloud +description: Enterprise File Sync and Share +version: 13.0.2 +category: File Synchronisation +projectURL: none + diff --git a/templates/wordpress/0/docker-compose.yml b/templates/wordpress/0/docker-compose.yml deleted file mode 100644 index fab2268..0000000 --- a/templates/wordpress/0/docker-compose.yml +++ /dev/null @@ -1,82 +0,0 @@ -version: '2' -services: - mariadb: - image: 'mariadb' - volumes: - - 'mariadb_data:/var/lib/mysql' - environment: - - MYSQL_ROOT_PASSWORD=${mariadb_root_password} - - MYSQL_USER=${mariadb_user} - - MYSQL_PASSWORD=${mariadb_user_password} - - MYSQL_DATABASE=wordpress - - wordpress: - image: 'wordpress:4.5.1' - volumes: - - 'wordpress_data:/var/www/html' - depends_on: - - mariadb - links: - - mariadb:mariadb - environment: - - WORDPRESS_DB_HOST=mariadb - - WORDPRESS_DB_USER=${mariadb_user} - - WORDPRESS_DB_PASSWORD=${mariadb_user_password} - - WORDPRESS_USERNAME=${wordpress_username} - - WORDPRESS_PASSWORD=${wordpress_password} - labels: - io.rancher.container.hostname_override: container_name - service: https - - redirect-https: - image: hoffmannhosting/docker-nginx-https-redirect - labels: - io.rancher.container.hostname_override: container_name - service: http - - letsencrypt: - image: janeczku/rancher-letsencrypt:v0.5.0 - environment: - API_VERSION: Production - AWS_ACCESS_KEY: '' - AWS_SECRET_KEY: '' - AZURE_CLIENT_ID: '' - AZURE_CLIENT_SECRET: '' - AZURE_RESOURCE_GROUP: '' - AZURE_SUBSCRIPTION_ID: '' - AZURE_TENANT_ID: '' - CERT_NAME: ${DOMAIN} - CLOUDFLARE_EMAIL: '' - CLOUDFLARE_KEY: '' - DNSIMPLE_EMAIL: '' - DNSIMPLE_KEY: '' - DNS_RESOLVERS: 8.8.8.8:53,8.8.4.4:53 - DOMAINS: ${DOMAIN} - DO_ACCESS_TOKEN: '' - DYN_CUSTOMER_NAME: '' - DYN_PASSWORD: '' - DYN_USER_NAME: '' - EMAIL: s.hoffmann@hoffmann-hosting.de - EULA: 'Yes' - GANDI_API_KEY: '' - OVH_APPLICATION_KEY: '' - OVH_APPLICATION_SECRET: '' - OVH_CONSUMER_KEY: '' - PROVIDER: HTTP - PUBLIC_KEY_TYPE: RSA-2048 - RENEWAL_PERIOD_DAYS: '20' - RENEWAL_TIME: '12' - VULTR_API_KEY: '' - volumes: - - /var/lib/rancher:/var/lib/rancher - - zertifikate:/etc/letsencrypt - labels: - io.rancher.container.agent.role: environment - io.rancher.container.create_agent: 'true' - service: letsencrypt - -volumes: - mariadb_data: - driver: ${volume_driver} - wordpress_data: - driver: ${volume_driver} \ No newline at end of file diff --git a/templates/wordpress/0/rancher-compose.yml b/templates/wordpress/0/rancher-compose.yml deleted file mode 100644 index 3fcf960..0000000 --- a/templates/wordpress/0/rancher-compose.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '2' -catalog: - name: "WordPress" - version: "4.5.1" - description: "Blog tool, publishing platform and CMS based on bitnami images" - questions: - - variable: DOMAIN - description: "Wordpress Domain" - label: "Wordpress Domain" - required: true - default: "test.de" - type: "string" - - variable: mariadb_root_password - description: "MariaDB root password, set on first run" - label: "MariaDB Root Password" - required: true - default: "mariadb_my_root" - type: "password" - - variable: mariadb_user - description: "MariaDB database user, created on first run" - label: "MariaDB Database User" - required: true - default: "wordpress" - type: "string" - - variable: mariadb_user_password - description: "MariaDB database user password, set on first run" - label: "MariaDB Database User Password" - required: true - default: "wordpress_password" - type: "password" - - variable: mariadb_database_name - description: "WordPress database name" - label: "WordPress database name" - required: true - default: "wordpress" - type: "string" - - variable: wordpress_username - description: "WordPress application username" - label: "WordPress application username" - required: true - default: "admin" - type: "string" - - variable: wordpress_password - description: "WordPress application password" - label: "WordPress application password" - required: true - default: "bitnami" - type: "password" - - variable: volume_driver - description: "Volume driver to use with this service" - label: "Volume driver" - required: true - default: "rancher-nfs" - type: enum - options: - - local - - rancher-nfs -services: - wordpress: - scale: 1 - start_on_create: true - lb_config: - port_rules: - - target_port: 80 - hostname: ${DOMAIN} - - mariadb: - scale: 1 - start_on_create: true - - redirect-https: - scale: 1 - start_on_create: true - lb_config: - port_rules: - - target_port: 80 - hostname: ${DOMAIN} - - letsencrypt: - scale: 1 - start_on_create: true - lb_config: - port_rules: - - target_port: 80 - hostname: ${DOMAIN} \ No newline at end of file diff --git a/templates/wordpress/1/docker-compose.yml b/templates/wordpress/1/docker-compose.yml deleted file mode 100644 index 4ee561d..0000000 --- a/templates/wordpress/1/docker-compose.yml +++ /dev/null @@ -1,82 +0,0 @@ -version: '2' -services: - mariadb: - image: 'mariadb' - volumes: - - 'mariadb_data:/var/lib/mysql' - environment: - - MYSQL_ROOT_PASSWORD=${mariadb_root_password} - - MYSQL_USER=${mariadb_user} - - MYSQL_PASSWORD=${mariadb_user_password} - - MYSQL_DATABASE=wordpress - - wordpress: - image: 'wordpress:4.9.5' - volumes: - - 'wordpress_data:/var/www/html' - depends_on: - - mariadb - links: - - mariadb:mariadb - environment: - - WORDPRESS_DB_HOST=mariadb - - WORDPRESS_DB_USER=${mariadb_user} - - WORDPRESS_DB_PASSWORD=${mariadb_user_password} - - WORDPRESS_USERNAME=${wordpress_username} - - WORDPRESS_PASSWORD=${wordpress_password} - labels: - io.rancher.container.hostname_override: container_name - service: https - - redirect-https: - image: hoffmannhosting/docker-nginx-https-redirect - labels: - io.rancher.container.hostname_override: container_name - service: http - - letsencrypt: - image: janeczku/rancher-letsencrypt:v0.5.0 - environment: - API_VERSION: Production - AWS_ACCESS_KEY: '' - AWS_SECRET_KEY: '' - AZURE_CLIENT_ID: '' - AZURE_CLIENT_SECRET: '' - AZURE_RESOURCE_GROUP: '' - AZURE_SUBSCRIPTION_ID: '' - AZURE_TENANT_ID: '' - CERT_NAME: ${DOMAIN} - CLOUDFLARE_EMAIL: '' - CLOUDFLARE_KEY: '' - DNSIMPLE_EMAIL: '' - DNSIMPLE_KEY: '' - DNS_RESOLVERS: 8.8.8.8:53,8.8.4.4:53 - DOMAINS: ${DOMAIN} - DO_ACCESS_TOKEN: '' - DYN_CUSTOMER_NAME: '' - DYN_PASSWORD: '' - DYN_USER_NAME: '' - EMAIL: s.hoffmann@hoffmann-hosting.de - EULA: 'Yes' - GANDI_API_KEY: '' - OVH_APPLICATION_KEY: '' - OVH_APPLICATION_SECRET: '' - OVH_CONSUMER_KEY: '' - PROVIDER: HTTP - PUBLIC_KEY_TYPE: RSA-2048 - RENEWAL_PERIOD_DAYS: '20' - RENEWAL_TIME: '12' - VULTR_API_KEY: '' - volumes: - - /var/lib/rancher:/var/lib/rancher - - zertifikate:/etc/letsencrypt - labels: - io.rancher.container.agent.role: environment - io.rancher.container.create_agent: 'true' - service: letsencrypt - -volumes: - mariadb_data: - driver: ${volume_driver} - wordpress_data: - driver: ${volume_driver} \ No newline at end of file diff --git a/templates/wordpress/1/rancher-compose.yml b/templates/wordpress/1/rancher-compose.yml deleted file mode 100644 index 9285219..0000000 --- a/templates/wordpress/1/rancher-compose.yml +++ /dev/null @@ -1,87 +0,0 @@ -version: '2' -catalog: - name: "WordPress" - version: "4.9.5" - description: "Blog tool, publishing platform and CMS based on bitnami images" - questions: - - variable: DOMAIN - description: "Wordpress Domain" - label: "Wordpress Domain" - required: true - default: "test.de" - type: "string" - - variable: mariadb_root_password - description: "MariaDB root password, set on first run" - label: "MariaDB Root Password" - required: true - default: "mariadb_my_root" - type: "password" - - variable: mariadb_user - description: "MariaDB database user, created on first run" - label: "MariaDB Database User" - required: true - default: "wordpress" - type: "string" - - variable: mariadb_user_password - description: "MariaDB database user password, set on first run" - label: "MariaDB Database User Password" - required: true - default: "wordpress_password" - type: "password" - - variable: mariadb_database_name - description: "WordPress database name" - label: "WordPress database name" - required: true - default: "wordpress" - type: "string" - - variable: wordpress_username - description: "WordPress application username" - label: "WordPress application username" - required: true - default: "admin" - type: "string" - - variable: wordpress_password - description: "WordPress application password" - label: "WordPress application password" - required: true - default: "bitnami" - type: "password" - - variable: volume_driver - description: "Volume driver to use with this service" - label: "Volume driver" - required: true - default: "rancher-nfs" - type: enum - options: - - local - - rancher-nfs -services: - wordpress: - scale: 1 - start_on_create: true - lb_config: - port_rules: - - target_port: 80 - hostname: ${DOMAIN} - certs: - - ${DOMAIN} - - mariadb: - scale: 1 - start_on_create: true - - redirect-https: - scale: 1 - start_on_create: true - lb_config: - port_rules: - - target_port: 80 - hostname: ${DOMAIN} - - letsencrypt: - scale: 1 - start_on_create: true - lb_config: - port_rules: - - target_port: 80 - hostname: ${DOMAIN} \ No newline at end of file diff --git a/templates/wordpress/README.md b/templates/wordpress/README.md deleted file mode 100644 index 4de1c01..0000000 --- a/templates/wordpress/README.md +++ /dev/null @@ -1,12 +0,0 @@ -## What is inside WordPress Stack? -* MariaDB Database -* WordPress (php/apache) -* Rancher Load Balancer (haproxy) - -## Info -* To persist website and database data, two volumes are created: mariadb_data, wordpress_data. -* You can choose from one of existing rancher volume types depending on your own environment. - -## Compatibility Notes - -* Version v0.2-bitnami has some known [issue](https://github.com/bitnami/bitnami-docker-testlink/issues/17#issuecomment-261783035) with Docker overlay and overlay2 storage driver. Please try to switch to aufs or devicemapper. diff --git a/templates/wordpress/catalogIcon-wordpress.svg b/templates/wordpress/catalogIcon-wordpress.svg deleted file mode 100644 index 96bc855..0000000 --- a/templates/wordpress/catalogIcon-wordpress.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - diff --git a/templates/wordpress/config.yml b/templates/wordpress/config.yml deleted file mode 100644 index 65a457e..0000000 --- a/templates/wordpress/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: WordPress -description: | - Blog tool, publishing platform and CMS -version: 4.9.5 -category: Blogging