mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-22 04:25:06 +01:00
27d3fc99a9
* Bump capistrano from 3.15.0 to 3.16.0 Bumps [capistrano](https://github.com/capistrano/capistrano) from 3.15.0 to 3.16.0. - [Release notes](https://github.com/capistrano/capistrano/releases) - [Commits](https://github.com/capistrano/capistrano/compare/v3.15.0...v3.16.0) Signed-off-by: dependabot[bot] <support@github.com> * 3.16 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
33 lines
1007 B
Ruby
33 lines
1007 B
Ruby
# frozen_string_literal: true
|
|
|
|
lock '3.16.0'
|
|
|
|
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'
|