-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
feat: mongo replica sets #926
feat: mongo replica sets #926
Conversation
I intentionally did not add a toggle to the management page for the database, only in the creation dialog, because users should not be trying to switch a mongo database back and forth without proper backups, and I feel that should be more of a manual process, or a transfer between an old and new mongo database created within Dokploy |
|
||
const defaultMongoEnv = `MONGO_INITDB_DATABASE=admin\n${env ? `${env}` : ""}`; | ||
const defaultMongoEnv = `MONGO_INITDB_ROOT_USERNAME=${databaseUser}\nMONGO_INITDB_ROOT_PASSWORD=${databasePassword}\nMONGO_INITDB_DATABASE=admin\n${env ? `${env}` : ""}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left the username and password env variables here at all times, but they will only be actually used when the non-replica set mode is used because the replica set initialization script does it otherwise.
@thewilloftheshadow I cannot turn on or disable the toggle can you check? |
checked={field.value} | ||
onCheckedChange={field.onChange} | ||
disabled | ||
aria-readonly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aria-readonly |
Perhaps this should go too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're at it @Siumauricio wouldn't removing this also make sense?
Co-authored-by: Dominik Koch <dominik@koch-bautechnik.de>
This PR makes the default mongo database be initialized as a single node replica set.
Having a replica set is required for both Prisma to use MongoDB as well as using the MongoDB change streams feature.
Fixes #654