dependabot[bot] 048e6fd3af
Bump mongoose from 5.8.0 to 5.10.7 (#8046)
* Bump mongoose from 5.8.0 to 5.10.7

Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.8.0 to 5.10.7.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md)
- [Commits](https://github.com/Automattic/mongoose/compare/5.8.0...5.10.7)

Signed-off-by: dependabot[bot] <support@github.com>

* Do not use empty username or password in mongo connection

Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-02 09:27:46 +02:00

21 lines
931 B
Plaintext

module.exports = ({ env }) => ({
defaultConnection: 'default',
connections: {
default: {
connector: 'mongoose',
settings: {
host: env('DATABASE_HOST', '<%= settings.host %>'),
srv: env.bool('DATABASE_SRV', <%= settings.srv %>),
port: env.int('DATABASE_PORT', <%= settings.port %>),
database: env('DATABASE_NAME', '<%= settings.database %>'),
username: env('DATABASE_USERNAME', <% if (settings.username) { %>'<%= settings.username %>'<% } else { %>null<% } %>),
password: env('DATABASE_PASSWORD', <% if (settings.password) { %>'<%= settings.password %>'<% } else { %>null<% } %>),
},
options: {
authenticationDatabase: env('AUTHENTICATION_DATABASE', <% if (options.authenticationDatabase) { %>'<%= options.authenticationDatabase %>'<% } else { %>null<% } %>),
ssl: env.bool('DATABASE_SSL', <%= options.ssl %>),
},
},
},
});