summaryrefslogtreecommitdiffstats
path: root/local-setup/src/main/docker/janusgraph/entrypoint.sh
diff options
context:
space:
mode:
authorkurczews <krzysztof.kurczewski@nokia.com>2019-01-07 07:10:10 +0100
committerkurczews <krzysztof.kurczewski@nokia.com>2019-01-07 07:27:21 +0100
commite64f08ac8242a7db6eb3238ee0ad1a30c8aecf0d (patch)
treed152c7418987fe79260943a6c8b1467d201f69cb /local-setup/src/main/docker/janusgraph/entrypoint.sh
parent57a4c074857c33ba74dcce1ae4818e56ceb6c603 (diff)
Add simplified local setup
Simplify local setup described at: https://wiki.onap.org/display/DW/AAI+Developer+Environment+Setup+-+Casablanca * simplified janus-server setup * simplified haproxy setup * added docker-compose * introduce automatic tests for containers * added run instruction Issue-ID: AAI-2049 Change-Id: I7c033c6a4464f3da94bdf11566060693c0f8b005 Signed-off-by: kurczews <krzysztof.kurczewski@nokia.com>
Diffstat (limited to 'local-setup/src/main/docker/janusgraph/entrypoint.sh')
-rwxr-xr-xlocal-setup/src/main/docker/janusgraph/entrypoint.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/local-setup/src/main/docker/janusgraph/entrypoint.sh b/local-setup/src/main/docker/janusgraph/entrypoint.sh
new file mode 100755
index 0000000..8108866
--- /dev/null
+++ b/local-setup/src/main/docker/janusgraph/entrypoint.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# run short-living command and prevent docker from stopping
+
+JANUS_EXEC="janusgraph/bin/janusgraph.sh"
+
+onStart() {
+ ${JANUS_EXEC} start
+}
+
+onStop() {
+ ${JANUS_EXEC} stop
+}
+
+waitLoop() {
+ tail -f /dev/null &
+ wait $!
+}
+
+trap 'onStop; exit 0' SIGTERM SIGINT
+
+onStart || exit $?
+
+waitLoop \ No newline at end of file