├── Gemfile ├── bin ├── cap └── capify ├── Capfile ├── Gemfile.lock └── config ├── deploy.rb └── deploy ├── staging.rb └── production.rb /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source "https://rubygems.org" 4 | 5 | # gem "rails" 6 | 7 | gem "capistrano", "~> 3.19" 8 | gem "capistrano-bundler", "~> 2.1" 9 | gem "capistrano-maintenance", "~> 1.2" 10 | gem "capistrano-rails", "~> 1.7" 11 | gem "capistrano-rvm", "~> 0.1.2" 12 | -------------------------------------------------------------------------------- /bin/cap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'cap' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) 12 | 13 | require "rubygems" 14 | require "bundler/setup" 15 | 16 | load Gem.bin_path("capistrano", "cap") 17 | -------------------------------------------------------------------------------- /bin/capify: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'capify' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) 12 | 13 | require "rubygems" 14 | require "bundler/setup" 15 | 16 | load Gem.bin_path("capistrano", "capify") 17 | -------------------------------------------------------------------------------- /Capfile: -------------------------------------------------------------------------------- 1 | # Load DSL and set up stages 2 | require "capistrano/setup" 3 | 4 | # Includes default deployment tasks 5 | require "capistrano/deploy" 6 | require "capistrano/scm/git" 7 | install_plugin Capistrano::SCM::Git 8 | 9 | # Includes tasks from other gems included in your Gemfile 10 | require "capistrano/bundler" 11 | require "capistrano/rails/assets" 12 | require "capistrano/rails/migrations" 13 | 14 | require "capistrano/maintenance" 15 | require "capistrano/rvm" 16 | 17 | # Load custom tasks from `lib/capistrano/tasks` if you have any defined 18 | Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } 19 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | airbrussh (1.5.3) 5 | sshkit (>= 1.6.1, != 1.7.0) 6 | base64 (0.3.0) 7 | capistrano (3.19.2) 8 | airbrussh (>= 1.0.0) 9 | i18n 10 | rake (>= 10.0.0) 11 | sshkit (>= 1.9.0) 12 | capistrano-bundler (2.1.1) 13 | capistrano (~> 3.1) 14 | capistrano-maintenance (1.2.1) 15 | capistrano (>= 3.0) 16 | capistrano-rails (1.7.0) 17 | capistrano (~> 3.1) 18 | capistrano-bundler (>= 1.1, < 3) 19 | capistrano-rvm (0.1.2) 20 | capistrano (~> 3.0) 21 | sshkit (~> 1.2) 22 | concurrent-ruby (1.3.5) 23 | i18n (1.14.7) 24 | concurrent-ruby (~> 1.0) 25 | logger (1.7.0) 26 | net-scp (4.1.0) 27 | net-ssh (>= 2.6.5, < 8.0.0) 28 | net-sftp (4.0.0) 29 | net-ssh (>= 5.0.0, < 8.0.0) 30 | net-ssh (7.3.0) 31 | ostruct (0.6.3) 32 | rake (13.3.0) 33 | sshkit (1.24.0) 34 | base64 35 | logger 36 | net-scp (>= 1.1.2) 37 | net-sftp (>= 2.1.2) 38 | net-ssh (>= 2.8.0) 39 | ostruct 40 | 41 | PLATFORMS 42 | arm64-darwin-24 43 | ruby 44 | 45 | DEPENDENCIES 46 | capistrano (~> 3.19) 47 | capistrano-bundler (~> 2.1) 48 | capistrano-maintenance (~> 1.2) 49 | capistrano-rails (~> 1.7) 50 | capistrano-rvm (~> 0.1.2) 51 | 52 | BUNDLED WITH 53 | 2.7.1 54 | -------------------------------------------------------------------------------- /config/deploy.rb: -------------------------------------------------------------------------------- 1 | # config valid for current version and patch releases of Capistrano 2 | lock "~> 3.19.2" 3 | 4 | set :application, "my_app_name" 5 | set :repo_url, "git@example.com:me/my_repo.git" 6 | 7 | # Default branch is :master 8 | # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp 9 | 10 | # Default deploy_to directory is /var/www/my_app_name 11 | # set :deploy_to, "/var/www/my_app_name" 12 | 13 | # Default value for :format is :airbrussh. 14 | # set :format, :airbrussh 15 | 16 | # You can configure the Airbrussh format using :format_options. 17 | # These are the defaults. 18 | # set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto 19 | 20 | # Default value for :pty is false 21 | # set :pty, true 22 | 23 | # Default value for :linked_files is [] 24 | # append :linked_files, "config/database.yml", 'config/master.key' 25 | 26 | # Default value for linked_dirs is [] 27 | # append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system", "vendor", "storage" 28 | 29 | # Default value for default_env is {} 30 | # set :default_env, { path: "/opt/ruby/bin:$PATH" } 31 | 32 | # Default value for local_user is ENV['USER'] 33 | # set :local_user, -> { `git config user.name`.chomp } 34 | 35 | # Default value for keep_releases is 5 36 | # set :keep_releases, 5 37 | 38 | # Uncomment the following to require manually verifying the host key before first deploy. 39 | # set :ssh_options, verify_host_key: :secure 40 | -------------------------------------------------------------------------------- /config/deploy/staging.rb: -------------------------------------------------------------------------------- 1 | # server-based syntax 2 | # ====================== 3 | # Defines a single server with a list of roles and multiple properties. 4 | # You can define all roles on a single server, or split them: 5 | 6 | # server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value 7 | # server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value 8 | # server "db.example.com", user: "deploy", roles: %w{db} 9 | 10 | 11 | 12 | # role-based syntax 13 | # ================== 14 | 15 | # Defines a role with one or multiple servers. The primary server in each 16 | # group is considered to be the first unless any hosts have the primary 17 | # property set. Specify the username and a domain or IP for the server. 18 | # Don't use `:all`, it's a meta role. 19 | 20 | # role :app, %w{deploy@example.com}, my_property: :my_value 21 | # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value 22 | # role :db, %w{deploy@example.com} 23 | 24 | 25 | 26 | # Configuration 27 | # ============= 28 | # You can set any configuration variable like in config/deploy.rb 29 | # These variables are then only loaded and set in this stage. 30 | # For available Capistrano configuration variables see the documentation page. 31 | # http://capistranorb.com/documentation/getting-started/configuration/ 32 | # Feel free to add new variables to customise your setup. 33 | 34 | 35 | 36 | # Custom SSH Options 37 | # ================== 38 | # You may pass any option but keep in mind that net/ssh understands a 39 | # limited set of options, consult the Net::SSH documentation. 40 | # http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start 41 | # 42 | # Global options 43 | # -------------- 44 | # set :ssh_options, { 45 | # keys: %w(/home/user_name/.ssh/id_rsa), 46 | # forward_agent: false, 47 | # auth_methods: %w(password) 48 | # } 49 | # 50 | # The server-based syntax can be used to override options: 51 | # ------------------------------------ 52 | # server "example.com", 53 | # user: "user_name", 54 | # roles: %w{web app}, 55 | # ssh_options: { 56 | # user: "user_name", # overrides user setting above 57 | # keys: %w(/home/user_name/.ssh/id_rsa), 58 | # forward_agent: false, 59 | # auth_methods: %w(publickey password) 60 | # # password: "please use keys" 61 | # } 62 | -------------------------------------------------------------------------------- /config/deploy/production.rb: -------------------------------------------------------------------------------- 1 | # server-based syntax 2 | # ====================== 3 | # Defines a single server with a list of roles and multiple properties. 4 | # You can define all roles on a single server, or split them: 5 | 6 | # server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value 7 | # server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value 8 | # server "db.example.com", user: "deploy", roles: %w{db} 9 | 10 | server "icu_www_app", user: "joconnor", roles: %w{app db web} 11 | # set :maintenance_template_path, File.expand_path("../../../app/views/layouts/maintenance.html.erb", __FILE__) 12 | 13 | # role-based syntax 14 | # ================== 15 | 16 | # Defines a role with one or multiple servers. The primary server in each 17 | # group is considered to be the first unless any hosts have the primary 18 | # property set. Specify the username and a domain or IP for the server. 19 | # Don't use `:all`, it's a meta role. 20 | 21 | # role :app, %w{deploy@example.com}, my_property: :my_value 22 | # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value 23 | # role :db, %w{deploy@example.com} 24 | 25 | 26 | 27 | # Configuration 28 | # ============= 29 | # You can set any configuration variable like in config/deploy.rb 30 | # These variables are then only loaded and set in this stage. 31 | # For available Capistrano configuration variables see the documentation page. 32 | # http://capistranorb.com/documentation/getting-started/configuration/ 33 | # Feel free to add new variables to customise your setup. 34 | 35 | 36 | 37 | # Custom SSH Options 38 | # ================== 39 | # You may pass any option but keep in mind that net/ssh understands a 40 | # limited set of options, consult the Net::SSH documentation. 41 | # http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start 42 | # 43 | # Global options 44 | # -------------- 45 | # set :ssh_options, { 46 | # keys: %w(/home/user_name/.ssh/id_rsa), 47 | # forward_agent: false, 48 | # auth_methods: %w(password) 49 | # } 50 | # 51 | # The server-based syntax can be used to override options: 52 | # ------------------------------------ 53 | # server "example.com", 54 | # user: "user_name", 55 | # roles: %w{web app}, 56 | # ssh_options: { 57 | # user: "user_name", # overrides user setting above 58 | # keys: %w(/home/user_name/.ssh/id_rsa), 59 | # forward_agent: false, 60 | # auth_methods: %w(publickey password) 61 | # # password: "please use keys" 62 | # } 63 | --------------------------------------------------------------------------------