Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/puma'
require 'capistrano/nvm'

# Load the SCM plugin appropriate to your project:
#
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ group :development do
gem 'binding_of_caller'
gem 'capistrano', require: false
gem 'capistrano3-puma', require: false
gem 'capistrano-nvm', require: false
gem 'capistrano-rails', require: false
gem 'capistrano-rbenv', require: false
end
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ GEM
sshkit (>= 1.9.0)
capistrano-bundler (2.2.0)
capistrano (~> 3.1)
capistrano-nvm (0.0.7)
capistrano (~> 3.1)
capistrano-rails (1.7.0)
capistrano (~> 3.1)
capistrano-bundler (>= 1.1, < 3)
Expand Down Expand Up @@ -504,6 +506,7 @@ DEPENDENCIES
binding_of_caller
bundle-audit
capistrano
capistrano-nvm
capistrano-rails
capistrano-rbenv
capistrano3-puma
Expand Down
11 changes: 10 additions & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@
# config valid for current version and patch releases of Capistrano
lock '~> 3.20.0'

set :nvm_type, :user # or :system, depends on your nvm setup
set :nvm_node, 'v24.13.1'
set :nvm_prefix, '/home/deploy/.nvm/nvm.sh'
set :nvm_map_bins, %w[node npm yarn bundle]

set :rbenv_type, :user # or :system, depends on your rbenv setup
set :rbenv_ruby, File.read('.ruby-version').strip
set :rbenv_prefix,
"RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
"RBENV_ROOT=#{fetch(:rbenv_path)} " \
"RBENV_VERSION=#{fetch(:rbenv_ruby)} " \
"#{fetch(:nvm_prefix)} " \
"#{fetch(:rbenv_path)}/bin/rbenv exec"

set :rbenv_map_bins, %w[rake gem bundle ruby rails puma pumactl]
set :rbenv_roles, :all # default value

Expand Down