From fd77e21d2b0b34d1eb312738ed5b23c217e83c37 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Wed, 6 Feb 2019 22:05:02 -0500 Subject: [PATCH 1/6] Created folder --- templates/Grav/0/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 templates/Grav/0/README.md diff --git a/templates/Grav/0/README.md b/templates/Grav/0/README.md new file mode 100644 index 0000000..23ce3c5 --- /dev/null +++ b/templates/Grav/0/README.md @@ -0,0 +1 @@ +# Grav \ No newline at end of file From 3efd739c63ed3abc96de245abba6fa65bebdd79d Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Thu, 16 May 2019 14:15:03 -0400 Subject: [PATCH 2/6] Initial config to get things going --- templates/Grav/0/docker-compose.yml | 30 +++++++++++++++++++++++++ templates/Grav/0/rancher-compose.yml | 33 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 templates/Grav/0/docker-compose.yml create mode 100644 templates/Grav/0/rancher-compose.yml diff --git a/templates/Grav/0/docker-compose.yml b/templates/Grav/0/docker-compose.yml new file mode 100644 index 0000000..fef325c --- /dev/null +++ b/templates/Grav/0/docker-compose.yml @@ -0,0 +1,30 @@ +version: '2' + +services: + grav: + image: williammiceli/grav:latest-git + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + labels: + io.rancher.container.pull_image: always + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + traefik.enable: true + ### Start Grav Segment + traefik.frontend.entryPoints: http,https + traefik.frontend.headers.forceSTSHeader: true + traefik.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) + traefik.frontend.headers.SSLRedirect: true + traefik.frontend.headers.STSPreload: true + traefik.frontend.headers.STSSeconds: 15552000 + traefik.frontend.passHostHeader: true + traefik.frontend.rule: Host:${TRAEFIK_HOST} + traefik.port: "80" + ### End Grav Segment + restart: on-failure + volumes: + - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system + - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system +# - /Rancher/${DATA_DIR}/Backups:/ # Backups \ No newline at end of file diff --git a/templates/Grav/0/rancher-compose.yml b/templates/Grav/0/rancher-compose.yml new file mode 100644 index 0000000..c869807 --- /dev/null +++ b/templates/Grav/0/rancher-compose.yml @@ -0,0 +1,33 @@ +version: '2' +catalog: + name: Grav + version: latest + # description: + # minimum_rancher_version: + # maximum_rancher_version: + # upgrade_from: + questions: + + - variable: "HOST_LABEL" + label: "Host Label Key/Value Pair" + description: | + The Label Key/Value pair of the host which containers should be deployed + default: "host.id=Host1" + required: false + type: string + + - variable: "TRAEFIK_HOST" + label: "Public Host Domain" + description: | + The host that Traefik will use to provide public access. + default: "subdomain.domain.tld" + required: true + type: string + + - variable: "DATA_DIR" + label: "Data Directory" + description: | + The directory to store persistent data for the stack. + default: "Personal/Grav" + required: true + type: string From 1818afa406e0d941b6f44e476bad255e0ac8518e Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Thu, 16 May 2019 14:17:31 -0400 Subject: [PATCH 3/6] Added config file --- templates/Grav/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 templates/Grav/config.yml diff --git a/templates/Grav/config.yml b/templates/Grav/config.yml new file mode 100644 index 0000000..ce691b9 --- /dev/null +++ b/templates/Grav/config.yml @@ -0,0 +1,8 @@ +name: Grav +description: | + Status: EXPERIMENTAL +version: latest +# category: +maintainer: WilliamMiceli +# license: +# projectURL: \ No newline at end of file From d28c3c2c3d5ee5758470cdd4bc9c4ff87e5fb051 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Thu, 16 May 2019 14:23:42 -0400 Subject: [PATCH 4/6] Added ports for debugging --- templates/Grav/0/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/Grav/0/docker-compose.yml b/templates/Grav/0/docker-compose.yml index fef325c..50cef21 100644 --- a/templates/Grav/0/docker-compose.yml +++ b/templates/Grav/0/docker-compose.yml @@ -23,6 +23,8 @@ services: traefik.frontend.rule: Host:${TRAEFIK_HOST} traefik.port: "80" ### End Grav Segment + ports: + - "80:80" restart: on-failure volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system From 2e98dfa33b464534e85f51b0e7e22c3140c2dc74 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Fri, 17 May 2019 22:23:25 -0400 Subject: [PATCH 5/6] Removed ports; added volumes for backups and images --- templates/Grav/0/docker-compose.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/Grav/0/docker-compose.yml b/templates/Grav/0/docker-compose.yml index 50cef21..6a8786f 100644 --- a/templates/Grav/0/docker-compose.yml +++ b/templates/Grav/0/docker-compose.yml @@ -23,10 +23,9 @@ services: traefik.frontend.rule: Host:${TRAEFIK_HOST} traefik.port: "80" ### End Grav Segment - ports: - - "80:80" restart: on-failure volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system -# - /Rancher/${DATA_DIR}/Backups:/ # Backups \ No newline at end of file + - /Rancher/${DATA_DIR}/Backups:/var/www/backup # Backups + - /Rancher/${DATA_DIR}/Images:/var/www/images # Images \ No newline at end of file From f624fc9ae4ec14f7ae325815c90ff1842421ca10 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sat, 18 May 2019 10:40:45 -0400 Subject: [PATCH 6/6] Specified :rw on volumes --- templates/Grav/0/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/Grav/0/docker-compose.yml b/templates/Grav/0/docker-compose.yml index 6a8786f..0195a5e 100644 --- a/templates/Grav/0/docker-compose.yml +++ b/templates/Grav/0/docker-compose.yml @@ -27,5 +27,5 @@ services: volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system - - /Rancher/${DATA_DIR}/Backups:/var/www/backup # Backups - - /Rancher/${DATA_DIR}/Images:/var/www/images # Images \ No newline at end of file + - /Rancher/${DATA_DIR}/Backups:/var/www/backup:rw # Backups + - /Rancher/${DATA_DIR}/Images:/var/www/images:rw # Images \ No newline at end of file