提交 d22a359a 编写于 作者: J José Valim

Do not store production information in .yml files

Instead, read information from environment variables.
上级 f4f496df
......@@ -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'] %>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册