recap icon indicating copy to clipboard operation
recap copied to clipboard

Add simple postgres functionality

Open tomafro opened this issue 11 years ago • 6 comments

I've been thinking about this since @lazyatom suggested it. Not sure the best thing to do. I'm pretty sure we shouldn't read the rails config in any way, or do anything related to rails in any way. However, as we have access to environment variables, maybe we could latch onto DATABASE_URL variable and if set, use that to create an appropriate database and role?

Maybe a postgres recipe could:

a) Add a default DATABASE_URL, something like postgres://application-user:random-password@localhost/application

b) Add a hook to deploy:setup to create the role and database defined in the database url. It would be necessary for the user logging in and running deploy:setup to have their own role on the database, with permission to create roles and databases.

tomafro avatar Mar 28 '13 17:03 tomafro

If it's not possible to create the role and database, we could print out instructions

tomafro avatar Mar 28 '13 18:03 tomafro

If not being done, close?

mdespuits avatar Oct 15 '13 20:10 mdespuits

Not being worked on right now I'm afraid.

tomafro avatar Oct 15 '13 21:10 tomafro

Then can it be closed if it is not being worked on or do you have plans?

mdespuits avatar Oct 15 '13 22:10 mdespuits

What's the advantage of closing it? I think it's legitimate to leave it open if @tomafro wants to garner opinions/advice from others - or even a pull request from some helpful person.

floehopper avatar Oct 15 '13 22:10 floehopper

Oh, just noticed that he was the original creator. Sorry about that...

mdespuits avatar Oct 15 '13 23:10 mdespuits