We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35f3f69 commit 7469d5fCopy full SHA for 7469d5f
health_check
@@ -1,7 +1,5 @@
1
#!/bin/sh
2
3
-set -e
4
-
5
# Web health check if web is started in this container
6
if [ -f /run/supervisor.conf.d/web.conf ]; then
7
if [ -f /app/data/ssl/privkey.pem ]; then
@@ -13,6 +11,14 @@ fi
13
11
14
12
# Supervisor based health check
15
services="$(/app/venv/bin/supervisorctl status)"
+status_code=$?
+# 3 is expected as there is a single stopped service (check)
16
+if [ $status_code -ne 0 ] && [ $status_code -ne 3 ]; then
17
+ echo "supervisorctl failed ($status_code)"
18
+ exit 1
19
+fi
20
+
21
+# Look for failed services
22
failing="$(echo "$services" | grep -v '^check *EXITED\|RUNNING' || true)"
23
if [ -n "$failing" ]; then
24
echo "$failing"
0 commit comments