From 6227eb85afdb34eed3aca837d78542c7e2076dfe Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sun, 9 Dec 2018 17:45:46 -0500 Subject: [PATCH] Super happy to be wrong about needing pre-made config! I previously thought that a configuration was necessary, as I assumed that there was no built-in mode. But very happy to be wrong that it can absolutely be ran to serve static content without making your own nginx.conf file! --- templates/Nginx/0/docker-compose.yml | 4 +++- templates/Nginx/0/rancher-compose.yml | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/templates/Nginx/0/docker-compose.yml b/templates/Nginx/0/docker-compose.yml index a214a6e..0ac72a2 100644 --- a/templates/Nginx/0/docker-compose.yml +++ b/templates/Nginx/0/docker-compose.yml @@ -34,7 +34,9 @@ services: {{- end}} restart: on-failure volumes: -# - /RancherCattle/${DATA_DIR}/Configuration:/etc/nginx + {{- if eq .Values.PERSIST_CONF "true"}} + - /RancherCattle/${DATA_DIR}/Configuration:/etc/nginx + {{- end}} - /RancherCattle/${DATA_DIR}/HTML:/usr/share/nginx/html networks: diff --git a/templates/Nginx/0/rancher-compose.yml b/templates/Nginx/0/rancher-compose.yml index 8c17f28..e569f26 100644 --- a/templates/Nginx/0/rancher-compose.yml +++ b/templates/Nginx/0/rancher-compose.yml @@ -34,6 +34,14 @@ catalog: required: false type: int + - variable: "PERSIST_CONF" + label: "Persistent Configuration" + description: | + Have a persistent congiguration directory. + default: true + required: true + type: boolean + - variable: "DATA_DIR" label: "Data Directory" description: |