diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-03-01 18:35:20 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-03-01 18:35:20 +0100 |
commit | 7dea13aae8187fb0d078938b10d0093e80e328ff (patch) | |
tree | 3c3c5c39b59d43e0762a59f670c5f8fc8c9c4a3b | |
parent | f4cd752a95fb0cde172e7ce1a8b15568db4274b6 (diff) | |
download | adei-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...
-rw-r--r-- | adei/Dockerfile | 2 | ||||
-rwxr-xr-x | adei/openshift-entrypoint.sh | 14 | ||||
-rwxr-xr-x | adei/scripts/adei-branch.sh | 2 |
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 |