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.
2 parents 406fc31 + 5cb5107 commit 994dc60Copy full SHA for 994dc60
Dockerfile
@@ -64,5 +64,6 @@ EXPOSE 3000
64
65
COPY root/ /
66
67
-# default command
+HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 CMD /healthcheck.sh
68
+
69
CMD ["sh","/start.sh"]
root/healthcheck.sh
@@ -0,0 +1,21 @@
1
+#!/bin/bash
2
3
+# Check TFTP (UDP 69)
4
+if ! nc -z -u -w2 127.0.0.1 69; then
5
+ echo "TFTP check failed"
6
+ exit 1
7
+fi
8
9
+# Check HTTP (nginx)
10
+if ! curl -fs http://127.0.0.1:${NGINX_PORT:-80}/ > /dev/null; then
11
+ echo "HTTP check failed"
12
13
14
15
+# Check Web App
16
+if ! curl -fs http://127.0.0.1:${WEB_APP_PORT:-3000}/ > /dev/null; then
17
+ echo "Web App check failed"
18
19
20
21
+exit 0
0 commit comments