-
Notifications
You must be signed in to change notification settings - Fork 18
Customizing the database.yml template
bruno- edited this page Oct 6, 2014
·
2 revisions
This is how the default database.yml
template looks like:
<%= fetch :pg_env %>:
adapter: postgresql
encoding: <%= pg_encoding %>
database: <%= pg_database %>
pool: <%= pg_pool %>
username: <%= pg_user %>
password: '<%= pg_password %>'
host: <%= pg_host %>
If for any reason you want to edit or tweak this template, you can copy it to
config/deploy/templates/postgresql.yml.erb
with this command:
$ bundle exec rails g capistrano:postgresql:template
After you edit this newly created file in your repo, it will be used as a
template for database.yml
on the server.
You can configure the template location. For example:
set :pg_templates_path, "config"
and the template will be copied to
config/postgresql.yml.erb
.