diff --git a/CHANGELOG.md b/CHANGELOG.md index f85e0fed7..a326afc18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * Added application-exapmle.yml and removed application.yml from repo, please add config/application.yml back when deploying: cp current/config/application-example.yml shared/config/application.yml # and edit it +* Removed config/initilizers/devise_secret.rb, use application.yml 16.01.2015 diff --git a/README.md b/README.md index 9fa7aaad0..d9cc0a649 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ Manual demo install and database setup: rbenv local 2.2.0 bundle cp config/database-example.yml config/database.yml # and edit it - cp config/secrets-example.yml config/secrets.yml # and edit it, generate key with 'rake secret' cp config/initializers/devise_secret_example.rb.txt config/initializers/devise_secret.rb # and edit bundle exec rake assets:precompile @@ -64,8 +63,6 @@ Production install (database schema should be loaded and seeds should be present cd registry cp current/config/application-example.yml shared/config/application.yml # and edit it cp current/config/database-example.yml shared/config/database.yml # and edit it - # You can generate secret keys with 'bundle exec rake secret' - cp current/config/secrets-example.yml shared/config/secrets.yml # and edit it cp current/config/initializers/devise_secret_example.rb.txt shared/config/initializers/devise_secret.rb # and edit it vi /etc/apache2/sites-enabled/registry.conf # add conf and all needed serts diff --git a/config/application-example.yml b/config/application-example.yml index 8f47813c5..389647a40 100644 --- a/config/application-example.yml +++ b/config/application-example.yml @@ -2,6 +2,12 @@ defaults: &defaults app_name: .EE Registry zonefile_export_dir: 'export/zonefiles' + # You can use `rake secret` to generate a secure secret key. + # Your secret key is used for verifying the integrity of signed cookies. + # If you change this key, all old signed cookies will become invalid! + secret_key_base: please-change-it-you-can-generate-it-with-rake-secret + devise_secret: please-change-it-you-can-generate-it-with-rake-secret + development: <<: *defaults diff --git a/config/deploy.rb b/config/deploy.rb index ba4147c02..2c7f2718b 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -36,9 +36,8 @@ end # Manually create these paths in shared/ (eg: shared/config/database.yml) in your server. # They will be linked in the 'deploy:link_shared_paths' step. set :shared_paths, [ - 'config/initializers/devise_secret.rb', + 'config/application.yml', 'config/database.yml', - 'config/secrets.yml', 'log', 'public/system', 'export/zonefiles' diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index e6d86f760..8bbe137e2 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -4,9 +4,8 @@ Devise.setup do |config| # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will render invalid all existing # confirmation, reset password and unlock tokens in the database. - # config.secret_key = 'd4827f0d88c93db5c68eb43d7f86dc141ea7c44ca8f' \ - # '044773265a2aa8786122c4364271960a10a956701c3c5fd4509e9c9780886200a3b772e6185271001987' - + config.secret_key = APP_CONFIG['devise_secret'] + # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer, # note that it will be overwritten if you use your own mailer class diff --git a/config/initializers/devise_secret_example.rb.txt b/config/initializers/devise_secret_example.rb.txt deleted file mode 100644 index 0e19a27cf..000000000 --- a/config/initializers/devise_secret_example.rb.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Please generate production secret with 'rake secret' command -# example secret: 'c831d559c77de1e6544ed4954d5752c294d2390036e45962dc0d44942f20db795ab7b0485b34faf237183660348e3192344404f52df7dee23d8031521d550f89' -Devise.setup do |config| - config.secret_key = 'please-change' -end