Skip to content

Commit

Permalink
Handle MongoDB service on Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
kaanklky committed Dec 7, 2021
1 parent ba5c15f commit c02ac9c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bin/countly.install_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ apt-get -y install sendmail
#install mongodb
bash "$DIR/scripts/mongodb.install.sh"

if [ "$INSIDE_DOCKER" == "1" ]
then
bash "$DIR/commands/docker/mongodb.sh" &
until mongo --eval "db.stats()" | grep "collections"
do
echo
echo "waiting for MongoDB to allocate files..."
sleep 1
done
sleep 3
fi

bash "$DIR/scripts/detect.init.sh"

#configure and start nginx
Expand Down Expand Up @@ -148,3 +160,8 @@ then
fi

bash "$DIR/scripts/done.sh";

if [ "$INSIDE_DOCKER" == "1" ]
then
kill -2 `pgrep mongo`
fi

0 comments on commit c02ac9c

Please sign in to comment.