Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom database name in config #3280

Closed
1 of 2 tasks
skybird23333 opened this issue Apr 14, 2023 · 1 comment
Closed
1 of 2 tasks

Allow custom database name in config #3280

skybird23333 opened this issue Apr 14, 2023 · 1 comment

Comments

@skybird23333
Copy link

Is your feature request related to a problem? Please elaborate.

Currently, when the bot connects to a MongoDB instance it uses the database name modmail_bot which is hard coded. This means a new MongoDB instance needs to be created for each instance of the bot.

Describe the solution you'd like

Allow the database name to be configured via .env, and have the following lines read from .env.

https://github.com/modmail-dev/modmail/blob/b21037cbd794a962569de6240c1d95c13009a64e/core/clients.py#L448

https://github.com/modmail-dev/modmail/blob/b21037cbd794a962569de6240c1d95c13009a64e/core/clients.py#L500

Does your solution involve any of the following?

  • Logviewer
  • New config option

Describe alternatives you've considered

Haven't thought of any, maybe to edit the source code directly(for users).

Who will this benefit?

People who need to host multiple modmail instances and don't want to make multiple MongoDB atlases/deploy multiple instances of the server for each bot.

Additional Information

No response

@raidensakura
Copy link
Member

Duplicate of #3191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants