recap
recap copied to clipboard
Add simple postgres functionality
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.
If it's not possible to create the role and database, we could print out instructions
If not being done, close?
Not being worked on right now I'm afraid.
Then can it be closed if it is not being worked on or do you have plans?
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.
Oh, just noticed that he was the original creator. Sorry about that...