README.md in capistrano-rails-1.4.0 vs README.md in capistrano-rails-1.5.0
- old
+ new
@@ -10,11 +10,11 @@
Add these Capistrano gems to your application's Gemfile using `require: false`:
```ruby
group :development do
gem "capistrano", "~> 3.10", require: false
- gem "capistrano-rails", "~> 1.4", require: false
+ gem "capistrano-rails", "~> 1.5", require: false
end
```
Run the following command to install the gems:
@@ -110,9 +110,29 @@
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
2. Create your feature branch (`git checkout -b my-new-feature`)