1
0
Fork 1
forked from fedi/mastodon
mastodon/config/deploy.rb
dependabot[bot] f5e6cbacf3
Bump capistrano from 3.14.0 to 3.14.1 (#14037)
* Bump capistrano from 3.14.0 to 3.14.1

Bumps [capistrano](https://github.com/capistrano/capistrano) from 3.14.0 to 3.14.1.
- [Release notes](https://github.com/capistrano/capistrano/releases)
- [Commits](https://github.com/capistrano/capistrano/compare/v3.14.0...v3.14.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump capistrano from 3.14.0 to 3.14.1

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2020-06-17 06:31:30 +02:00

33 lines
1,007 B
Ruby

# frozen_string_literal: true
lock '3.14.1'
set :repo_url, ENV.fetch('REPO', 'https://github.com/tootsuite/mastodon.git')
set :branch, ENV.fetch('BRANCH', 'master')
set :application, 'mastodon'
set :rbenv_type, :user
set :rbenv_ruby, File.read('.ruby-version').strip
set :migration_role, :app
append :linked_files, '.env.production', 'public/robots.txt'
append :linked_dirs, 'vendor/bundle', 'node_modules', 'public/system'
namespace :systemd do
%i[sidekiq streaming web].each do |service|
%i[reload restart status].each do |action|
desc "Perform a #{action} on #{service} service"
task "#{service}:#{action}".to_sym do
on roles(:app) do
# runs e.g. "sudo restart mastodon-sidekiq.service"
sudo :systemctl, action, "#{fetch(:application)}-#{service}.service"
end
end
end
end
end
after 'deploy:publishing', 'systemd:web:reload'
after 'deploy:publishing', 'systemd:sidekiq:restart'
after 'deploy:publishing', 'systemd:streaming:restart'