From 4390817f89b93d22db37e327d41dcc5e57dd3f76 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Mon, 19 Nov 2018 17:26:49 -0500 Subject: [PATCH] Added option for service to use host's time --- templates/Snipe-IT/0/docker-compose.yml | 3 +++ templates/Snipe-IT/0/rancher-compose.yml | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/templates/Snipe-IT/0/docker-compose.yml b/templates/Snipe-IT/0/docker-compose.yml index 66cbb76..b11284c 100644 --- a/templates/Snipe-IT/0/docker-compose.yml +++ b/templates/Snipe-IT/0/docker-compose.yml @@ -52,6 +52,9 @@ services: {{- end}} restart: on-failure volumes: + {{- if eq .Values.HOST_TIME "true"}} + - /etc/localtime:/etc/localtime:ro + {{- end}} - /RancherCattleData/${DATA_DIR}/Application:/var/lib/snipeit - /RancherCattleData/${DATA_DIR}/Backups:/var/www/html/storage/app/backups mysql: diff --git a/templates/Snipe-IT/0/rancher-compose.yml b/templates/Snipe-IT/0/rancher-compose.yml index 05a87e5..72086d7 100644 --- a/templates/Snipe-IT/0/rancher-compose.yml +++ b/templates/Snipe-IT/0/rancher-compose.yml @@ -63,4 +63,12 @@ catalog: description: | A random 32-Character string which will be used for encryption. required: true - type: password \ No newline at end of file + type: password + + - variable: "HOST_TIME" + label: "Use Host's Date/Time" + description: | + Use the host's date and time for the container. + default: true + required: true + type: boolean \ No newline at end of file