summaryrefslogtreecommitdiffstats
path: root/adei
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-01 18:35:20 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-01 18:35:20 +0100
commit7dea13aae8187fb0d078938b10d0093e80e328ff (patch)
tree3c3c5c39b59d43e0762a59f670c5f8fc8c9c4a3b /adei
parentf4cd752a95fb0cde172e7ce1a8b15568db4274b6 (diff)
downloadadei-7dea13aae8187fb0d078938b10d0093e80e328ff.tar.gz
adei-7dea13aae8187fb0d078938b10d0093e80e328ff.tar.bz2
adei-7dea13aae8187fb0d078938b10d0093e80e328ff.tar.xz
adei-7dea13aae8187fb0d078938b10d0093e80e328ff.zip
Add entrypoint for OpenShift which is waiting until ADEI sources are populated and ready...
Diffstat (limited to 'adei')
-rw-r--r--adei/Dockerfile2
-rwxr-xr-xadei/openshift-entrypoint.sh14
-rwxr-xr-xadei/scripts/adei-branch.sh2
3 files changed, 17 insertions, 1 deletions
diff --git a/adei/Dockerfile b/adei/Dockerfile
index e0ee4ad..4d05961 100644
--- a/adei/Dockerfile
+++ b/adei/Dockerfile
@@ -66,7 +66,7 @@ ENV ADEI_PORTS 80
ENV APACHE_SERVERS 0
-COPY docker-entrypoint.sh /
+COPY *-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 80
diff --git a/adei/openshift-entrypoint.sh b/adei/openshift-entrypoint.sh
new file mode 100755
index 0000000..b4fc4f4
--- /dev/null
+++ b/adei/openshift-entrypoint.sh
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+while [ ! -f /adei/cfg/.ready ]; do
+ echo "Waiting for ADEI intialization..."
+ sleep 5
+done
+
+while [ ! -f "$1" ]; do
+ echo "The script $1 is not populated yet. Waiting...."
+ sleep 1
+done
+
+echo "Running: $@"
+exec /bin/bash "$@"
diff --git a/adei/scripts/adei-branch.sh b/adei/scripts/adei-branch.sh
index 64d37a4..4ba77ac 100755
--- a/adei/scripts/adei-branch.sh
+++ b/adei/scripts/adei-branch.sh
@@ -70,4 +70,6 @@ LOCK_FILE=.lock
fi
done
)
+
+ touch /adei/cfg/.ready
) 10> /adei/cfg/$LOCK_FILE 11> /adei/src/$LOCK_FILE