Remove Capistrano

This commit is contained in:
Georg Gadinger 2020-04-19 19:43:55 +02:00
parent 8b129bbbf4
commit 2237287472
7 changed files with 0 additions and 190 deletions

18
Capfile
View File

@ -1,18 +0,0 @@
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
# Load the SCM plugin
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
# Include tasks from other gems included in your Gemfile
#require "rvm1/capistrano3"
require "capistrano/bundler"
require "capistrano/rails/assets"
require "capistrano/rails/migrations"
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }

11
Gemfile
View File

@ -82,17 +82,6 @@ group :development do
gem 'web-console', '< 4.0.0' gem 'web-console', '< 4.0.0'
end end
# Deployment
group :development do
gem 'capistrano', '~> 3.8', require: false
gem 'capistrano-rails', require: false
gem 'rbnacl', '>= 3.2', '< 5.0', require: false
gem 'rbnacl-libsodium', require: false
gem 'bcrypt_pbkdf', '>= 1.0', '< 2.0', require: false
gem 'ed25519', require: false
end
group :production do group :production do
gem 'unicorn', group: :production gem 'unicorn', group: :production
end end

View File

@ -67,13 +67,10 @@ GEM
tzinfo (~> 1.1) tzinfo (~> 1.1)
addressable (2.7.0) addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
arel (9.0.0) arel (9.0.0)
autoprefixer-rails (9.7.6) autoprefixer-rails (9.7.6)
execjs execjs
bcrypt (3.1.13) bcrypt (3.1.13)
bcrypt_pbkdf (1.0.1)
better_errors (2.6.0) better_errors (2.6.0)
coderay (>= 1.0.0) coderay (>= 1.0.0)
erubi (>= 1.0.0) erubi (>= 1.0.0)
@ -93,16 +90,6 @@ GEM
buftok (0.2.0) buftok (0.2.0)
builder (3.2.4) builder (3.2.4)
byebug (11.1.2) byebug (11.1.2)
capistrano (3.13.0)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (1.6.0)
capistrano (~> 3.1)
capistrano-rails (1.4.0)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capybara (3.32.1) capybara (3.32.1)
addressable addressable
mini_mime (>= 0.1.3) mini_mime (>= 0.1.3)
@ -144,7 +131,6 @@ GEM
docile (1.3.2) docile (1.3.2)
domain_name (0.5.20190701) domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
ed25519 (1.2.4)
equalizer (0.0.11) equalizer (0.0.11)
erubi (1.9.0) erubi (1.9.0)
excon (0.73.0) excon (0.73.0)
@ -291,9 +277,6 @@ GEM
naught (1.1.0) naught (1.1.0)
nenv (0.3.0) nenv (0.3.0)
nested_form (0.3.2) nested_form (0.3.2)
net-scp (2.0.0)
net-ssh (>= 2.6.5, < 6.0.0)
net-ssh (5.2.0)
newrelic_rpm (6.10.0.364) newrelic_rpm (6.10.0.364)
nio4r (2.5.2) nio4r (2.5.2)
nokogiri (1.10.9) nokogiri (1.10.9)
@ -392,10 +375,6 @@ GEM
rb-fsevent (0.10.3) rb-fsevent (0.10.3)
rb-inotify (0.10.1) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
rbnacl (4.0.2)
ffi
rbnacl-libsodium (1.0.16)
rbnacl (>= 3.0.1)
redcarpet (3.5.0) redcarpet (3.5.0)
redis (4.1.3) redis (4.1.3)
regexp_parser (1.7.0) regexp_parser (1.7.0)
@ -468,9 +447,6 @@ GEM
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sshkit (1.21.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
sweetalert-rails (1.1.3) sweetalert-rails (1.1.3)
railties (>= 3.1.0) railties (>= 3.1.0)
temple (0.8.2) temple (0.8.2)
@ -525,7 +501,6 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
bcrypt (~> 3.1.7) bcrypt (~> 3.1.7)
bcrypt_pbkdf (>= 1.0, < 2.0)
better_errors better_errors
bootstrap-sass (~> 3.4.0) bootstrap-sass (~> 3.4.0)
bootstrap3-datetimepicker-rails (~> 4.7.14) bootstrap3-datetimepicker-rails (~> 4.7.14)
@ -533,8 +508,6 @@ DEPENDENCIES
bootswatch-rails bootswatch-rails
brakeman brakeman
byebug byebug
capistrano (~> 3.8)
capistrano-rails
capybara capybara
coffee-rails (~> 4.1) coffee-rails (~> 4.1)
colorize colorize
@ -543,7 +516,6 @@ DEPENDENCIES
devise (~> 4.0) devise (~> 4.0)
devise-async devise-async
devise-i18n devise-i18n
ed25519
factory_bot_rails factory_bot_rails
fake_email_validator fake_email_validator
faker faker
@ -580,8 +552,6 @@ DEPENDENCIES
rails-i18n (~> 5.0) rails-i18n (~> 5.0)
rails_admin rails_admin
rake rake
rbnacl (>= 3.2, < 5.0)
rbnacl-libsodium
redcarpet redcarpet
redis redis
rspec-rails (~> 3.9) rspec-rails (~> 3.9)

View File

@ -1,43 +0,0 @@
# config valid only for current version of Capistrano
lock "3.13.0"
set :application, "retrospring"
set :repo_url, "git@git.rrerr.net:nilsding/retrospring.git"
# Default branch is :master
ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, "/home/justask/apps/retrospring"
# Default value for :format is :airbrussh.
# set :format, :airbrussh
# You can configure the Airbrussh format using :format_options.
# These are the defaults.
# set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto
# Default value for :pty is false
# set :pty, true
# Default value for :linked_files is []
append :linked_files, "config/database.yml", "config/justask.yml", "config/secrets.yml", "config/unicorn.rb",
"config/newrelic.yml", "config/initializers/devise.rb"
# Default value for linked_dirs is []
append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/uploads", "public/system", "public/exports"
# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
# Default value for keep_releases is 5
# set :keep_releases, 5
# Ruby version / RVM
set :rvm1_ruby_version, '2.3.3@retrospring'
# Create JS i18n files before precompiling assets
before 'deploy:assets:precompile', 'deploy:i18n_js'
# Restart the app server after successful deploy
after 'deploy:cleanup', 'deploy:restart'

View File

@ -1,39 +0,0 @@
# Defines a single server with a list of roles and multiple properties.
server "retrospring-001.aws.infra.retrospring.net", user: "justask", roles: %w{app db web}
# Configuration
# =============
# You can set any configuration variable like in config/deploy.rb
# These variables are then only loaded and set in this stage.
# For available Capistrano configuration variables see the documentation page.
# http://capistranorb.com/documentation/getting-started/configuration/
# Feel free to add new variables to customise your setup.
set :rails_env, :production
# Custom SSH Options
# ==================
# You may pass any option but keep in mind that net/ssh understands a
# limited set of options, consult the Net::SSH documentation.
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
#
# Global options
# --------------
# set :ssh_options, {
# keys: %w(/home/rlisowski/.ssh/id_rsa),
# forward_agent: false,
# auth_methods: %w(password)
# }
#
# The server-based syntax can be used to override options:
# ------------------------------------
# server "example.com",
# user: "user_name",
# roles: %w{web app},
# ssh_options: {
# user: "user_name", # overrides user setting above
# keys: %w(/home/user_name/.ssh/id_rsa),
# forward_agent: false,
# auth_methods: %w(publickey password)
# # password: "please use keys"
# }

View File

@ -1,11 +0,0 @@
namespace :deploy do
task :i18n_js do
on roles(:all) do
within release_path do
with rails_env: fetch(:rails_env), rails_groups: fetch(:rails_assets_groups) do
execute :rake, "i18n:js:export"
end
end
end
end
end

View File

@ -1,38 +0,0 @@
namespace :deploy do
task :start do
on roles(:all) do
puts "------- skip start"
next
rvm_prefix = "#{fetch(:rvm1_auto_script_path)}/rvm-auto.sh #{fetch(:rvm1_ruby_version)}"
execute :tmux, 'new-session',
'-d',
'-s', 'retrospring',
'-n', 'retrospring',
'-c', '/usr/home/justask/apps/retrospring/current',
"'#{rvm_prefix} bundle exec foreman start'"
end
end
task :stop do
on roles(:all) do
puts "------- skip stop"
next
execute :sh, '-c', '\'tmux list-panes -t retrospring -F "#{pane_pid}" | xargs kill\''
end
end
desc 'Restart the server'
task :restart do
on roles(:all) do
puts "------- skip restart"
next
info 'Restarting application server'
invoke('deploy:stop')
info 'Waiting 5 seconds'
sleep 5
invoke('deploy:start')
end
end
end