FEATURE: added template for critical DNS caching

FEATURE: added template for critical DNS caching

From b06dc1b1f21dd2e0db408e587d682ac86dc19f29 Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Fri, 23 Nov 2018 15:09:11 +1100
Subject: [PATCH] FEATURE: added template for critical DNS caching


diff --git a/templates/cache-dns.template.yml b/templates/cache-dns.template.yml
new file mode 100644
index 0000000..51f2825
--- /dev/null
+++ b/templates/cache-dns.template.yml
@@ -0,0 +1,19 @@
+# You can use this template to cache DNS lookups for
+#
+# DISCOURSE_DB_HOST
+# DISCOURSE_DB_BACKUP_HOST
+# DISCOURSE_REDIS_HOST
+# DISCOURSE_REDIS_SLAVE_HOST
+#
+# If you are using a hostname vs IP for these entries and have
+# an internal DNS outage Discourse will stop working
+#
+# This template allows you to cache entry in the hosts file
+#
+# Note, for this to work correctly you must also install the
+# discourse-prometheus plugin to collect stats
+
+hooks:
+  after_bundle_exec:
+    - exec: "mkdir -p /etc/service/cache_critical_dns/"
+    - exec: "cp /var/www/discourse/script/cache_critical_dns /etc/service/cache_critical_dns/run"

GitHub

1 Like