From 80fa8fa8c13b945cbb8a0b9b4a330fe72268b795 Mon Sep 17 00:00:00 2001 From: Benjamin Diaz Date: Fri, 24 May 2019 12:27:10 -0300 Subject: [PATCH] Adds healthcheck to LWUI Dockerfile Change-Id: I73cb2379a8fad6b759c0cba4c4b4703c60a1e087 Signed-off-by: Benjamin Diaz --- docker/light-ui/Dockerfile | 3 +++ installers/osm_health.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/light-ui/Dockerfile b/docker/light-ui/Dockerfile index 29cbb743..bfcc9e29 100644 --- a/docker/light-ui/Dockerfile +++ b/docker/light-ui/Dockerfile @@ -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"] diff --git a/installers/osm_health.sh b/installers/osm_health.sh index 1a9dc7d2..bde1a6a6 100755 --- a/installers/osm_health.sh +++ b/installers/osm_health.sh @@ -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 -- 2.25.1