Skip to content

Instantly share code, notes, and snippets.

@nata79
Created October 19, 2012 11:32
Show Gist options
  • Save nata79/3917721 to your computer and use it in GitHub Desktop.
Save nata79/3917721 to your computer and use it in GitHub Desktop.
database.yml for appfgo
production:
adapter: postgresql
encoding: unicode
pool: 5
timeout: 5000
host: <%= JSON.parse( ENV['VCAP_SERVICES'] )['postgres'].first['credentials']['hostname'] rescue 'localhost' %>
port: <%= JSON.parse( ENV['VCAP_SERVICES'] )['postgres'].first['credentials']['port'] rescue 3306 %>
database: <%= JSON.parse( ENV['VCAP_SERVICES'] )['postgres'].first['credentials']['name'] rescue '' %>
username: <%= JSON.parse( ENV['VCAP_SERVICES'] )['postgres'].first['credentials']['username'] rescue '' %>
password: <%= JSON.parse( ENV['VCAP_SERVICES'] )['postgres'].first['credentials']['password'] rescue '' %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment