openvidu-deployment: Revert and stop elasticsearch and kibana in CF userData if properties ElasticsearchUrl and KibanaUrl are defined

pull/567/head
cruizba 2020-11-25 00:12:59 +01:00
parent b02ed1aac0
commit 933ac7b2f8
2 changed files with 9 additions and 7 deletions

View File

@ -656,8 +656,13 @@ Resources:
# Start openvidu application
pushd /opt/openvidu
export FOLLOW_OPENVIDU_LOGS=false
/bin/bash openvidu start
docker-compose up -d
if [[ ! -z ${ElasticsearchUrl} ]]; then
docker-compose stop elasticsearch
fi
if [[ ! -z ${KibanaUrl} ]]; then
docker-compose stop kibana
fi
popd
# Wait for the app

View File

@ -227,15 +227,12 @@ usage() {
printf "\n"
}
# Follow openvidu logs by default
[ -z "${FOLLOW_OPENVIDU_LOGS}" ] && export FOLLOW_OPENVIDU_LOGS=true
case $1 in
start)
docker-compose up -d
stop_elk_if_external
[[ "${FOLLOW_OPENVIDU_LOGS}" == "true" ]] && docker-compose logs -f openvidu-server
docker-compose logs -f openvidu-server
;;
stop)
@ -246,7 +243,7 @@ case $1 in
docker-compose down
docker-compose up -d
stop_elk_if_external
[[ "${FOLLOW_OPENVIDU_LOGS}" == "true" ]] && docker-compose logs -f openvidu-server
docker-compose logs -f openvidu-server
;;
logs)