diff options
Diffstat (limited to 'config/deploy.rb')
-rw-r--r-- | config/deploy.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index 53b4fb3..43ec4c6 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -16,6 +16,24 @@ set :linked_dirs, fetch(:linked_dirs, []).push('public/uploads') # set :keep_releases, 5 namespace :deploy do + file 'config.yml' do |f| + template = "---\n" + + "contact_email: contact@example.com\n" + + "smtp:\n" + + " address: localhost\n" + + " port: 25\n" + + "accept_registrations:\n" + + " start: YYYY.MM.DD\n" + + " stop: YYYY.MM.DD\n" + IO.write(t.name, template) + end + + before 'check:linked_files', :upload_config => 'config.yml' do |t| + on roles(:app) do + shared_dir = File.join(fetch(:deploy_to), 'shared') + upload!(t.prerequisites.first, File.join(shared_dir, t.prerequisites.first)) + end + end after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do |