1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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'] %>