balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.84k stars 1.95k forks source link

Is there a way to reload the datastore db config after the sails lifted? #7118

Open prudhvichitturi opened 3 years ago

prudhvichitturi commented 3 years ago

Node version: v14.15.4 Sails version (sails): v1.2.4 ORM hook version (sails-hook-orm): v2.1.1 Sockets hook version (sails-hook-sockets): v2.0.0 Organics hook version (sails-hook-organics): - Grunt hook version (sails-hook-grunt): v4.0.0 Uploads hook version (sails-hook-uploads): - DB adapter & version (e.g. sails-mysql@5.55.5): sails-postgresql@2.0.0 Skipper adapter & version (e.g. skipper-s3@5.55.5): -


Is there a way to reload the datastore db config after the sails lifted?

We have a use case to change the database host dynamically based on the availability and auto-rotation of database password.

So we need to change the db configuration after the sails was lifted. Could someone let us know, if we can override the db configuration during runtime? or any possible ways to accomplish this problem?

Would appreciate the great help!

sailsbot commented 3 years ago

@prudhvichitturi Thanks for posting! We'll take a look as soon as possible.

In the mean time, there are a few ways you can help speed things along:

Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.

For help with questions about Sails, click here.

prudhvichitturi commented 3 years ago

@rachaelshaw @mikermcneil - Could you please help me here, if possible?

eashaw commented 3 years ago

Hi @prudhvichitturi, Sails does not support changing the db config while the server is running.