diff --git a/templates/drupal/1/docker-compose.yml.tpl b/templates/drupal/1/docker-compose.yml.tpl new file mode 100644 index 0000000..39657db --- /dev/null +++ b/templates/drupal/1/docker-compose.yml.tpl @@ -0,0 +1,59 @@ +version: '2' +services: + drupal: + image: drupal:8.3.5-apache + labels: + io.rancher.container.hostname_override: container_name + links: + - db:db + volumes: + - drupal-modules:/var/www/html/modules + - drupal-profiles:/var/www/html/profiles + - drupal-themes:/var/www/html/themes + - drupal-sites:/var/www/html/sites + restart: always + + drupal-lb: + image: rancher/lb-service-haproxy:v0.6.4 + ports: + - ${PUBLIC_PORT}:${PUBLIC_PORT} + + db: + labels: + io.rancher.container.hostname_override: container_name + {{- if eq .Values.DB_TYPE "postgres"}} + image: postgres:9.6.3-alpine + environment: + POSTGRES_USER: ${DB_USER} + POSTGRES_PASSWORD: ${DB_PASS} + POSTGRES_DB: ${DB_NAME} + {{- end}} + {{- if eq .Values.DB_TYPE "mysql"}} + image: mysql:5.7.18 + environment: + MYSQL_DATABASE: ${DB_NAME} + MYSQL_ROOT_PASSWORD: ${DB_PASS} + MYSQL_USER: ${DB_USER} + MYSQL_PASSWORD: ${DB_PASS} + {{- end}} + volumes: + {{- if eq .Values.DB_TYPE "postgres"}} + - db-data:/var/lib/postgresql + {{- end}} + {{- if eq .Values.DB_TYPE "mysql"}} + - db-data:/var/lib/mysql + {{- end}} + restart: always + +volumes: + drupal-modules: + driver: local + drupal-profiles: + driver: local + drupal-themes: + driver: local + drupal-sites: + driver: local + db-data: + driver: local + diff --git a/templates/drupal/1/rancher-compose.yml b/templates/drupal/1/rancher-compose.yml new file mode 100644 index 0000000..8fb6f3e --- /dev/null +++ b/templates/drupal/1/rancher-compose.yml @@ -0,0 +1,76 @@ +version: '2' +catalog: + name: "Drupal" + version: "8.3.5-rancher1" + description: "Blog tool, publishing platform and CMS" + uuid: Drupal-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: "PUBLIC_PORT" + description: "public port to access the drupal site" + label: "Public Port" + required: true + default: "15080" + type: "int" + + - variable: "DB_TYPE" + description: "public port to access the drupal site" + label: "DB type" + required: true + default: "postgres" + type: "enum" + options: + - "mysql" + - "postgres" + + - variable: "DB_NAME" + description: "Database Name to use for the server" + label: "DB Name" + required: true + default: "drupal" + type: "string" + + - variable: "DB_USER" + description: "Database User to use for the server" + label: "DB User" + required: true + default: "drupal" + type: "string" + + - variable: "DB_PASS" + description: "Database Password to use for the server" + label: "DB Password" + required: true + default: "" + type: "password" +services: + drupal: + retain_ip: true + scale: 1 + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 80 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 + drupal-lb: + scale: 1 + start_on_create: true + lb_config: + certs: [] + port_rules: + - priority: 1 + protocol: http + service: drupal + source_port: ${PUBLIC_PORT} + target_port: 80 + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 42 + unhealthy_threshold: 3 + initializing_timeout: 60000 + interval: 2000 + reinitializing_timeout: 60000 diff --git a/templates/drupal/config.yml b/templates/drupal/config.yml index bb0e086..0877efe 100644 --- a/templates/drupal/config.yml +++ b/templates/drupal/config.yml @@ -1,5 +1,5 @@ name: Drupal description: | Drupal is an open source CMS powering millions of websites and applications. -version: v0.1 +version: "8.3.5-rancher1" category: CMS