-
Notifications
You must be signed in to change notification settings - Fork 19
Configuration options
This page is not a required read. Consult it only if you're looking for something specific.
Put all your configs in your RAILS Capistrano deploy/environment files: config/deploy/production.rb
Here's the list of options and the defaults for each option:
-
set :pg_database
Name of the database for your app. Defaults to#{application}_#{stage}, example:myface_production. -
set :pg_username
Name of the database user. Defaults to whatever is set forpg_databaseoption. -
set :pg_password
Password for the database user. It's suggested you use an ENV in your config/deploy/*.rb files instead of plaintext passwords. -
set :pg_ask_for_password
Defaultfalse. Set this option totrueif you want to be prompted for the password when database user is created. This is safer than setting the password viapg_password. The downside is you have to choose and remember yet another password.
Versions <v4.8.0:pg_passwordtakes precedence overpg_ask_for_password
Versions >=v4.8.0:pg_passwordis ignored ifpg_ask_for_passwordis true. -
set :pg_generate_random_password
Defaultfalse. Set this option totrueif you want the gem to generate a random password for you. -
set :pg_system_user
Defaultpostgres. Set this option to the user that owns the postgres process on your system. Normally the default is fine, but for instance on FreeBSD the default postgres user ispgsql. -
set :pg_system_db
Defaultpostgres. Set this if the system database doesn't have the standard name. Usually, there should be no reason to change this from the default. -
set :pg_extensions
Defaults to empty array[]. If for example, you want to install "hstore" extension, just add it to the array withset :pg_extension, ["hstore"].
database.yml template-only settings:
-
set :pg_env
DB environment. Defaults to the value ofrails_envoption. Ifrails_envis not set, it defaults tostageoption. -
set :pg_encoding
encodingconfig indatabase.ymltemplate. Defaults tounicode. -
set :pg_pool
Pool config indatabase.ymltemplate. Defaults to5. -
set :pg_host
hostnameconfig indatabase.ymltemplate. Defaults tolocalhost.
Versions >= v4.8.0:
-
set :pg_socket
Defaults to an empty string -
set :pg_port
Defaults to 5432. -
set :pg_timeout
Defaults to 5000 (5 seconds; activerecord default).