File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -104,13 +104,9 @@ if [ -z "$MONGODB_REPLICA_SET" ]; then
104104fi
105105
106106# For replica set mode:
107- # If auth (username/password) is requested, ensure mongodb-key is provided
107+ # If auth (username/password) is requested, ensure mongodb-key is provided, otherwise generate random
108108if { [ -n " $MONGODB_USERNAME " ] || [ -n " $MONGODB_PASSWORD " ]; } && [ -z " $MONGODB_KEY " ]; then
109- echo " "
110- echo " The input [mongodb-key] is required when using [mongodb-username] or [mongodb-password] with a replica set."
111- echo " Generating random 'mongodb-key'."
112- echo " "
113- MONGODB_KEY=$( dd if=/dev/urandom bs=756 count=1 2> /dev/null | base64 | tr -d ' \n' )
109+ MONGODB_KEY=$( dd if=/dev/urandom bs=256 count=1 2> /dev/null | base64 | tr -d ' \n' )
114110fi
115111
116112echo " ::group::Starting MongoDB as single-node replica set"
You can’t perform that action at this time.
0 commit comments