From d4518cc0428f812d1cf3d07d31c9579b588d52a6 Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Wed, 21 Aug 2019 13:19:27 +1200 Subject: [PATCH] Update README to discuss uploading the master.key (#232) --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 43ae07b..fba6ead 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,26 @@ set :migration_role, :app The advantage is you won't need to deploy your application to your database server, and overall a better separation of concerns. +#### Uploading your master.key + +You can use the below configuration to upload your `master.key` to the server if it isn't already present. + +```ruby +append :linked_files, "config/master.key" + +namespace :deploy do + namespace :check do + before :linked_files, :set_master_key do + on roles(:app), in: :sequence, wait: 10 do + unless test("[ -f #{shared_path}/config/master.key ]") + upload! 'config/master.key', "#{shared_path}/config/master.key" + end + end + end + end +end +``` + ## Contributing 1. Fork it