Skip to content

Commit

Permalink
dont remove existing containers
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuspoehls committed Apr 8, 2024
1 parent 3f9d3a1 commit 67dfa2e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions start-mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ wait_for_mongodb () {
}

# check if the container already exists and remove it
if [ "$(docker ps -q -f name=$MONGODB_CONTAINER_NAME)" ]; then
echo "Removing existing container [$MONGODB_CONTAINER_NAME]"
docker rm -f $MONGODB_CONTAINER_NAME
fi
## TODO: put this behind an option flag
# if [ "$(docker ps -q -f name=$MONGODB_CONTAINER_NAME)" ]; then
# echo "Removing existing container [$MONGODB_CONTAINER_NAME]"
# docker rm -f $MONGODB_CONTAINER_NAME
# fi


if [ -z "$MONGODB_REPLICA_SET" ]; then
echo "::group::Starting single-node instance, no replica set"
Expand Down

0 comments on commit 67dfa2e

Please sign in to comment.