sailstech / multiple-apps-parse-server

run and manage multiple parse apps (instances) in a server and using a single port
MIT License
55 stars 12 forks source link

database or collection per app option...? #3

Closed rjpalermo1 closed 6 years ago

rjpalermo1 commented 6 years ago

It looks like the database storage is sorted for app by collection prefix which defaults to the appID, is this true?

Is it possible to allow an option upfront in the config to setup a new db for each app created? Like in config.json an option we can set to true that will create a new mongodb://localhost:27107/<appId>. This will allow easier portability backup and recovery on a per app basis...ya think?

If you want to take it a step further for security concerns you can generate a mongo username/password for new app also: mongodb://username:password@localhost:27107/<appId> and create the user in mongo. If you offer this feature then you will need to create the mongo admin username:password along with the dashboard admin on first app creation.

richjing commented 6 years ago

The original concept is that the multiple parse server apps only need one mongo db link because some DaaS (like mLab) is not available to set multiple database link in shared/sandbox cluster.

now you can set "useCollectionPrefix":false in config.json, the database link would be mongodb://localhost:27107/<appName>. In such case, the database would be easier to migrate in the future.