mirror of
https://github.com/mmumshad/ansible-playable.git
synced 2025-02-12 14:11:54 +00:00
Update startup script to skip starting local mongodb if MONGODB_URI is provided
This commit is contained in:
parent
58d5af647d
commit
318f4bb771
1 changed files with 10 additions and 4 deletions
|
@ -20,11 +20,17 @@ if [[ ${MOUNT_S3} = "True" ]];
|
|||
yas3fs s3://${S3_PATH} /opt/ansible-projects -f &
|
||||
fi
|
||||
|
||||
echo -e "${COLOR_GREEN}-----------------------------------------------------"
|
||||
echo -e " Start MONGODB Service"
|
||||
echo -e "-----------------------------------------------------${NC}"
|
||||
# Start MongoDB database in the background
|
||||
mongod &
|
||||
if [[ ${MONGODB_URI} == *"localhost"* || ${MONGODB_URI} == "" ]]
|
||||
then
|
||||
echo -e "${COLOR_GREEN}-----------------------------------------------------"
|
||||
echo -e " Start MONGODB Service"
|
||||
echo -e "-----------------------------------------------------${NC}"
|
||||
|
||||
mongod &
|
||||
else
|
||||
echo -e " -------------- Not Starting MONGODB Service -----------"
|
||||
fi
|
||||
|
||||
echo -e "${COLOR_GREEN}-----------------------------------------------------"
|
||||
echo -e " Start Web Server"
|
||||
|
|
Loading…
Reference in a new issue