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:
parent
f4f496dfeb
commit
d22a359a18
12 changed files with 36 additions and 40 deletions
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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"] %>
|
||||
|
|
|
@ -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'] %>
|
||||
|
|
Loading…
Reference in a new issue