Configure Capistrano
This commit is contained in:
parent
da56862183
commit
6d118a54b8
6 changed files with 119 additions and 1 deletions
33
Capfile
Normal file
33
Capfile
Normal file
|
@ -0,0 +1,33 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Load DSL and set up stages.
|
||||
require 'capistrano/setup'
|
||||
|
||||
# Include default deployment tasks.
|
||||
require 'capistrano/deploy'
|
||||
|
||||
# Load the SCM plugin appropriate to your project.
|
||||
require 'capistrano/scm/git'
|
||||
install_plugin Capistrano::SCM::Git
|
||||
|
||||
# Include tasks from other gems included in your Gemfile.
|
||||
#
|
||||
# For documentation on these, see for example:
|
||||
#
|
||||
# https://github.com/capistrano/rvm
|
||||
# https://github.com/capistrano/rbenv
|
||||
# https://github.com/capistrano/chruby
|
||||
# https://github.com/capistrano/bundler
|
||||
# https://github.com/capistrano/rails
|
||||
# https://github.com/capistrano/passenger
|
||||
#
|
||||
# require 'capistrano/rvm'
|
||||
# require 'capistrano/rbenv'
|
||||
# require 'capistrano/chruby'
|
||||
require 'capistrano/bundler'
|
||||
require 'capistrano/rails/assets'
|
||||
require 'capistrano/rails/migrations'
|
||||
# require 'capistrano/passenger'
|
||||
|
||||
# Load custom tasks from `lib/capistrano/tasks` if you have any defined.
|
||||
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
|
7
Gemfile
7
Gemfile
|
@ -83,6 +83,13 @@ group :development, :test do
|
|||
end
|
||||
|
||||
group :development do
|
||||
# Capistrano is a utility and framework for executing commands in parallel
|
||||
# on multiple remote machines, via SSH.
|
||||
gem 'capistrano', '~> 3.11', require: false
|
||||
|
||||
# Rails specific Capistrano tasks.
|
||||
gem 'capistrano-rails', '~> 1.4', require: false
|
||||
|
||||
# Call 'byebug' anywhere in the code to stop execution
|
||||
# and get a debugger console.
|
||||
gem 'byebug', platforms: %i[mri mingw x64_mingw]
|
||||
|
|
21
Gemfile.lock
21
Gemfile.lock
|
@ -42,6 +42,8 @@ GEM
|
|||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
airbrussh (1.3.1)
|
||||
sshkit (>= 1.6.1, != 1.7.0)
|
||||
arel (9.0.0)
|
||||
ast (2.4.0)
|
||||
autoprefixer-rails (9.3.1)
|
||||
|
@ -55,6 +57,17 @@ GEM
|
|||
sass (>= 3.5.2)
|
||||
builder (3.2.3)
|
||||
byebug (10.0.2)
|
||||
capistrano (3.11.0)
|
||||
airbrussh (>= 1.0.0)
|
||||
i18n
|
||||
rake (>= 10.0.0)
|
||||
sshkit (>= 1.9.0)
|
||||
capistrano-bundler (1.4.0)
|
||||
capistrano (~> 3.1)
|
||||
sshkit (~> 1.2)
|
||||
capistrano-rails (1.4.0)
|
||||
capistrano (~> 3.1)
|
||||
capistrano-bundler (~> 1.1)
|
||||
coderay (1.1.2)
|
||||
concurrent-ruby (1.1.3)
|
||||
coveralls (0.7.1)
|
||||
|
@ -117,6 +130,9 @@ GEM
|
|||
minitest (5.11.3)
|
||||
msgpack (1.2.4)
|
||||
multi_json (1.13.1)
|
||||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (5.0.2)
|
||||
netrc (0.11.0)
|
||||
nio4r (2.3.1)
|
||||
nokogiri (1.8.5)
|
||||
|
@ -235,6 +251,9 @@ GEM
|
|||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
sshkit (1.18.0)
|
||||
net-scp (>= 1.1.2)
|
||||
net-ssh (>= 2.8.0)
|
||||
term-ansicolor (1.7.0)
|
||||
tins (~> 1.0)
|
||||
thor (0.20.3)
|
||||
|
@ -268,6 +287,8 @@ DEPENDENCIES
|
|||
bootsnap (>= 1.1.0)
|
||||
bootstrap (~> 4.1.3)
|
||||
byebug
|
||||
capistrano (~> 3.11)
|
||||
capistrano-rails (~> 1.4)
|
||||
coveralls
|
||||
database_cleaner (~> 1.7)
|
||||
factory_bot_rails (~> 4.10)
|
||||
|
|
|
@ -1 +1 @@
|
|||
a4Z5eQ1qE/XddT8ECHJnOYbuU+f2O4y98gHXhgEbLnU2Dnma8JInr4POPU3okJbL8qYnieezoSCqXyczIsONCVUx/aT/pq32kqFXwa+lN4QdtnWu8RdZxsIH8JlIFZpf/+a9JL5HGH41SSnGuu3J9MFB5pz8FEhcewePrDH49XMWL+U5E/fr2crATDD3iZFzLYv2EcVCdZHYT1cslVub47zm7mjeUBXSm//rw+A33bPXAipgAFBsuAdkw5ziyQ9IERr5R/lCt4BHRsdAqn+1htWjiJylC05uQQhYu9UESJI2WR3iuoQ03kSRVMXTGgixh3FXc70UWSQAVjAB4u8kidYE/8tA2L2AzpLHSvIP4VHcLtQbDRzn1SEcN2MRHc4np7s0Fqb8R4i7ieF9PAO1VwEHAIOQEgy4as2l--Dq3Ae8mYiRzoK4la--ClffRyogBcj4ITVJ4vu4Pg==
|
||||
QtBlpQuGa0BjUXzdXxBXqXTp1qUF9xc4ULh4fJgAjWsShLAU62TwOmjiLw6gKeIGIZd9n1/hV6LcQRi8lPzq6kOHeLoBbKXub8+9lAZ/zsi+2LMvlgvlacZWw02BEpQMIoZuXrEojpzFSj+2b6Gx6ucC8ArSg6u64i+B7vl8i+MReQ7aKYn48J9TQ1NM4wwnpsSLC4VLlQ==--FuMPDqLpq9qRARv0--m/DxSG1WI+CMj/K3rtJAFw==
|
54
config/deploy.rb
Normal file
54
config/deploy.rb
Normal file
|
@ -0,0 +1,54 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Config valid for current version and patch releases of Capistrano.
|
||||
lock '~> 3.11.0'
|
||||
|
||||
set :application, 'partynest'
|
||||
set :repo_url, 'git@github.com:lpr-perm/partynest.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, '/var/www/my_app_name'
|
||||
|
||||
# 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'
|
||||
append :linked_files,
|
||||
'config/master.key'
|
||||
|
||||
# Default value for linked_dirs is [].
|
||||
# append :linked_dirs,
|
||||
# 'log',
|
||||
# 'tmp/pids',
|
||||
# 'tmp/cache',
|
||||
# 'tmp/sockets',
|
||||
# 'public/system'
|
||||
|
||||
# Default value for default_env is {}.
|
||||
# set :default_env, path: '/opt/ruby/bin:$PATH'
|
||||
|
||||
# Default value for local_user is ENV['USER'].
|
||||
# set :local_user, -> { `git config user.name`.chomp }
|
||||
|
||||
# Default value for keep_releases is 5.
|
||||
# set :keep_releases, 5
|
||||
|
||||
# Uncomment the following to require manually verifying the host key
|
||||
# before first deploy.
|
||||
# set :ssh_options, verify_host_key: :secure
|
3
config/deploy/production.rb
Normal file
3
config/deploy/production.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
server '159.65.200.239', roles: %w[web app db]
|
Reference in a new issue