hmans / pants

PANTS: Distributed Social Blogging.

Home Page:http://pants.social/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change default database configuration to use DATABASE_URL

hmans opened this issue · comments

As a followup to #10. This makes #pants 'compatible' with most cloud hosts and keeps it easy to configure for your favorite PostgreSQL instance without having to change database.yml in your fork or on deployment.

Hooray! \o/ I updated the wiki already. my deployment today:

$ dokku config:set pants.tubit.net  DATABASE_URL="postgres://topsecretuser:topsecretpassword@verysecrethost/tubits_pants"
-----> Setting config vars and restarting pants.tubit.net
DATABASE_URL: postgres://topsecretuser:topsecretpassword@verysecrethost/tubits_pants
-----> Releasing pants.tubit.net ...
-----> Release complete!
-----> Deploying pants.tubit.net ...
-----> Deploy complete!

And then on my local machine:

% git push tubit master
...
-----> Cleaning up ...
-----> Building pants.tubit.net ...
remote: done.
remote: HEAD is now at fdf21fe... Change bundled database.yml to use DATABASE_URL in production. (closes #11)
       Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.2
...
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1
...
-----> Releasing pants.tubit.net ...
-----> Deploying pants.tubit.net ...
=====> Application deployed:
       http://pants.tubit.net
...

I really love this dokku stuff. :-D (y)