Adds healthcheck to LWUI Dockerfile 46/7546/2
authorBenjamin Diaz <bdiaz@whitestack.com>
Fri, 24 May 2019 15:27:10 +0000 (12:27 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Fri, 24 May 2019 16:43:16 +0000 (13:43 -0300)
Change-Id: I73cb2379a8fad6b759c0cba4c4b4703c60a1e087
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
docker/light-ui/Dockerfile
installers/osm_health.sh

index 29cbb74..bfcc9e2 100644 (file)
@@ -35,4 +35,7 @@ RUN python manage.py collectstatic --noinput
 
 EXPOSE 80
 
+HEALTHCHECK --start-period=130s --interval=10s --timeout=5s --retries=12 \
+  CMD curl --silent --fail localhost:80 || exit 1
+
 CMD ["supervisord", "-n"]
index 1a9dc7d..bde1a6a 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 WAIT_TIME=340  # LCM healthcheck needs 2x(30+140) senconds
-SERVICES_WITH_HEALTH="nbi ro zookeeper lcm mon"
+SERVICES_WITH_HEALTH="nbi ro zookeeper lcm mon light-ui"
 NUM_SERVICES_WITH_HEALTH=$(echo $SERVICES_WITH_HEALTH | wc -w)
 WAIT_FINAL=30