Skip to content

Commit

Permalink
Strip trailing characters in database password
Browse files Browse the repository at this point in the history
Signed-off-by: alfred richardsn <rchrdsn@protonmail.ch>
  • Loading branch information
r4rdsn committed Dec 6, 2020
1 parent cc5a4d3 commit d29a0aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongo-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mongo -- "${MONGO_INITDB_DATABASE-$DATABASE_NAME}" <<EOF
db.createUser(
{
user: "${MONGO_INITDB_ROOT_USERNAME:-$DATABASE_USERNAME}",
pwd: "${MONGO_INITDB_ROOT_PASSWORD:-$(cat "${DATABASE_PASSWORD_FILENAME}")}",
pwd: "$(printf %s "${MONGO_INITDB_ROOT_PASSWORD:-$(cat ${DATABASE_PASSWORD_FILENAME})}")",
roles: ["readWrite"]
}
);
Expand Down

0 comments on commit d29a0aa

Please sign in to comment.