From 5c1968592d2132cdbcc7ff95ada5d4b7a3d1a9fc Mon Sep 17 00:00:00 2001 From: MattGrundy <38431311+MattGrundy@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:26:13 +0100 Subject: [PATCH] Add env to be able to disable vector logging (mainly used in CI) --- etc/supervisor/conf.d/logging.conf.tmpl | 2 +- usr/local/share/deskpro/container-var-reference.json | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/supervisor/conf.d/logging.conf.tmpl b/etc/supervisor/conf.d/logging.conf.tmpl index 05c6b57..e8783b1 100644 --- a/etc/supervisor/conf.d/logging.conf.tmpl +++ b/etc/supervisor/conf.d/logging.conf.tmpl @@ -4,7 +4,7 @@ user=vector umask=002 numprocs=1 startsecs=0 -autostart=true +autostart={{ getenv "SVC_VECTOR_ENABLED" "true" | ternary "true" "false" }} autorestart=true redirect_stderr=true stdout_logfile=/var/log/vector.log diff --git a/usr/local/share/deskpro/container-var-reference.json b/usr/local/share/deskpro/container-var-reference.json index b0c11d8..bce882c 100644 --- a/usr/local/share/deskpro/container-var-reference.json +++ b/usr/local/share/deskpro/container-var-reference.json @@ -704,10 +704,17 @@ "default": "false", "isPrivate": true }, + { + "name": "SVC_VECTOR_ENABLED", + "description": "Used in supervisor config - determines if the vector logging service should run.", + "type": "boolean", + "default": "true", + "isPrivate": true + }, { "name": "TASKS_DISABLE_EMAIL_IN_JOB", "description": "Prevent performing email collection/processing as part of cron (i.e. indicates that distinct email collection/processing services are being used instead)", "type": "boolean", "default": "false" } -] \ No newline at end of file +]