From 53e35941ed19227144a78e92379d054b791f0efc Mon Sep 17 00:00:00 2001 From: stebifan Date: Fri, 20 Apr 2018 12:54:14 +0200 Subject: [PATCH] Wordpress --- templates/wordpress/0/docker-compose.yml | 77 ++++++++++++++++ templates/wordpress/0/rancher-compose.yml | 92 +++++++++++++++++++ templates/wordpress/README.md | 12 +++ templates/wordpress/catalogIcon-wordpress.svg | 21 +++++ templates/wordpress/config.yml | 5 + 5 files changed, 207 insertions(+) create mode 100644 templates/wordpress/0/docker-compose.yml create mode 100644 templates/wordpress/0/rancher-compose.yml create mode 100644 templates/wordpress/README.md create mode 100644 templates/wordpress/catalogIcon-wordpress.svg create mode 100644 templates/wordpress/config.yml diff --git a/templates/wordpress/0/docker-compose.yml b/templates/wordpress/0/docker-compose.yml new file mode 100644 index 0000000..11c26a2 --- /dev/null +++ b/templates/wordpress/0/docker-compose.yml @@ -0,0 +1,77 @@ +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 + environment: + - WORDPRESS_DB_HOST=db + - WORDPRESS_DB_USER=${mariadb_user} + - WORDPRESS_DB_PASSWORD=${mariadb_user_password} + - WORDPRESS_USERNAME=${wordpress_username} + - WORDPRESS_PASSWORD=${wordpress_password} + + 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 new file mode 100644 index 0000000..2d71b2c --- /dev/null +++ b/templates/wordpress/0/rancher-compose.yml @@ -0,0 +1,92 @@ +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 + health_check: + port: 80 + interval: 5000 + unhealthy_threshold: 3 + request_line: 'GET / HTTP/1.0' + healthy_threshold: 2 + response_timeout: 5000 + 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/README.md b/templates/wordpress/README.md new file mode 100644 index 0000000..4de1c01 --- /dev/null +++ b/templates/wordpress/README.md @@ -0,0 +1,12 @@ +## 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 new file mode 100644 index 0000000..96bc855 --- /dev/null +++ b/templates/wordpress/catalogIcon-wordpress.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + diff --git a/templates/wordpress/config.yml b/templates/wordpress/config.yml new file mode 100644 index 0000000..0be7d68 --- /dev/null +++ b/templates/wordpress/config.yml @@ -0,0 +1,5 @@ +name: WordPress +description: | + Blog tool, publishing platform and CMS +version: v0.2-bitnami +category: Blogging