aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2018-11-27 23:21:22 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-27 23:21:22 +0000
commit06c04eb324466477ff9a3036d32098568428ba6b (patch)
treeee22fa4784b0793768b014438165295b2dacfea6
parent875e379f528df93e5b9794a32fff02ab7e1236a5 (diff)
parenta782bf8b4e45f598ee3894a224eec46c4d13ed1f (diff)
Merge "Add healthcheck script"
-rw-r--r--hv-collector-main/Dockerfile1
-rwxr-xr-xhv-collector-main/src/main/scripts/healthcheck.sh4
2 files changed, 5 insertions, 0 deletions
diff --git a/hv-collector-main/Dockerfile b/hv-collector-main/Dockerfile
index 8049abca..0170b645 100644
--- a/hv-collector-main/Dockerfile
+++ b/hv-collector-main/Dockerfile
@@ -15,4 +15,5 @@ ENTRYPOINT ["java", "-cp", "*:", "org.onap.dcae.collectors.veshv.main.MainKt"]
COPY target/libs/external/* ./
COPY target/libs/internal/* ./
+COPY src/main/scripts/healthcheck.sh ./
COPY target/hv-collector-main-*.jar ./
diff --git a/hv-collector-main/src/main/scripts/healthcheck.sh b/hv-collector-main/src/main/scripts/healthcheck.sh
new file mode 100755
index 00000000..db62eece
--- /dev/null
+++ b/hv-collector-main/src/main/scripts/healthcheck.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+curl -f http://localhost:${VESHV_HEALTH_CHECK_API_PORT:-6060}/health/ready || exit 1
+nc -vz localhost ${VESHV_LISTEN_PORT:-6061} || exit 2