Do not store production information in .yml files

Instead, read information from environment variables.
This commit is contained in:
José Valim 2013-12-23 18:54:39 +01:00
parent f4f496dfeb
commit d22a359a18
12 changed files with 36 additions and 40 deletions

View File

@ -23,6 +23,6 @@ test:
<<: *default
database: <%= app_name %>_test
production:
<<: *default
database: <%= app_name %>_production
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -61,6 +61,6 @@ test:
<<: *default
database: <%= app_name[0,4] %>_tst
production:
<<: *default
database: <%= app_name[0,8] %>
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -53,6 +53,6 @@ test:
<<: *default
url: jdbc:db://localhost/<%= app_name %>_test
production:
<<: *default
url: jdbc:db://localhost/<%= app_name %>_production
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -26,6 +26,6 @@ test:
<<: *default
database: <%= app_name %>_test
production:
<<: *default
database: <%= app_name %>_production
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -42,6 +42,6 @@ test:
<<: *default
database: <%= app_name %>_test
production:
<<: *default
database: <%= app_name %>_production
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -18,6 +18,6 @@ test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -32,6 +32,6 @@ test:
<<: *default
database: <%= app_name %>_test
production:
<<: *default
database: <%= app_name %>_production
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -32,6 +32,6 @@ test:
<<: *default
database: <%= app_name %>_test
production:
<<: *default
database: <%= app_name %>_production
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -59,6 +59,6 @@ test:
<<: *default
database: <%= app_name %>_test
production:
<<: *default
database: <%= app_name %>_production
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -20,6 +20,6 @@ test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -42,6 +42,6 @@ test:
<<: *default
database: <%= app_name %>_test
production:
<<: *default
database: <%= app_name %>_production
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
production: <%%= ENV["DATABASE_URL"] %>

View File

@ -16,11 +16,7 @@ development:
test:
secret_key_base: <%= app_secret %>
# This YAML file is processed by ERB first (as others). In particular the
# production environment can set the secret via an environment variable
# this way:
#
# secret_key_base: <%%= ENV['SECRET_KEY_BASE'] %>
#
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= app_secret %>
secret_key_base: <%%= ENV['SECRET_KEY_BASE'] %>