summary refs log tree commit diff
path: root/docker/conf-workers/healthcheck.sh.j2
diff options
context:
space:
mode:
authorMichael Kaye <1917473+michaelkaye@users.noreply.github.com>2021-11-26 14:05:20 +0000
committerGitHub <noreply@github.com>2021-11-26 14:05:20 +0000
commite2c300e7e4647500b0ff5ada8018cc984b78f91c (patch)
tree391a9f8eab79b9ed711e48035b0f34c31e567e6a /docker/conf-workers/healthcheck.sh.j2
parentTrack ongoing event fetches correctly (again) (#11376) (diff)
downloadsynapse-e2c300e7e4647500b0ff5ada8018cc984b78f91c.tar.xz
Create healthcheck script for synapse-workers container (#11429)
The intent is to iterate through all the worker ports and only
report healthy when all are healthy, starting with the main process.
Diffstat (limited to 'docker/conf-workers/healthcheck.sh.j2')
-rw-r--r--docker/conf-workers/healthcheck.sh.j26
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/conf-workers/healthcheck.sh.j2 b/docker/conf-workers/healthcheck.sh.j2
new file mode 100644
index 0000000000..79c621f89c
--- /dev/null
+++ b/docker/conf-workers/healthcheck.sh.j2
@@ -0,0 +1,6 @@
+#!/bin/sh
+# This healthcheck script is designed to return OK when every 
+# host involved returns OK
+{%- for healthcheck_url in healthcheck_urls %}
+curl -fSs {{ healthcheck_url }} || exit 1
+{%- endfor %}