fist cap (not working)

This commit is contained in:
Torsten 2022-03-29 12:41:48 +03:00
parent 7f2796ab51
commit 3fdee67353
5 changed files with 115 additions and 7 deletions

38
Capfile Normal file
View File

@ -0,0 +1,38 @@
# 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/hg"
# install_plugin Capistrano::SCM::Hg
# or
# require "capistrano/scm/svn"
# install_plugin Capistrano::SCM::Svn
# or
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 }

View File

@ -25,12 +25,11 @@ group :development, :test do
end
group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
gem "rack-mini-profiler"
gem "capistrano", "~> 3.17", require: false
gem 'capistrano-rbenv'
gem "capistrano-rails", require: false
end
group :test do

View File

@ -68,10 +68,25 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
bindex (0.8.1)
bootsnap (1.11.1)
msgpack (~> 1.2)
builder (3.2.4)
capistrano (3.17.0)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (2.0.1)
capistrano (~> 3.1)
capistrano-rails (1.6.2)
capistrano (~> 3.1)
capistrano-bundler (>= 1.1, < 3)
capistrano-rbenv (2.2.0)
capistrano (~> 3.1)
sshkit (~> 1.3)
capybara (3.36.0)
addressable
matrix
@ -138,6 +153,8 @@ GEM
net-protocol (0.1.2)
io-wait
timeout
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-smtp (0.3.1)
digest
net-protocol
@ -150,8 +167,6 @@ GEM
rack
rake (>= 0.8.1)
public_suffix (4.0.6)
puma (5.6.2)
nio4r (~> 2.0)
racc (1.6.0)
rack (2.2.3)
rack-mini-profiler (3.0.0)
@ -213,6 +228,9 @@ GEM
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
sshkit (1.21.2)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stimulus-rails (1.0.4)
railties (>= 6.0.0)
strscan (3.0.1)
@ -243,13 +261,15 @@ PLATFORMS
DEPENDENCIES
bootsnap
capistrano (~> 3.17)
capistrano-rails
capistrano-rbenv
capybara
debug
haml-rails
importmap-rails
net-ssh
passenger (>= 5.3.2)
puma (~> 5.0)
rack-mini-profiler
rails (~> 7.0)
sassc-rails

41
config/deploy.rb Normal file
View File

@ -0,0 +1,41 @@
# config valid for current version and patch releases of Capistrano
lock "~> 3.17.0"
set :application, "gateway"
set :repo_url, "https://github.com/rubydesign/gateway.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/feenix/gateway"
# 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/master.key'
#"config/database.yml",
# Default value for linked_dirs is []
append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "tmp/webpacker", "public/system", "vendor", "storage"
# 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
set :rbenv_ruby, '3.0.3'

View File

@ -0,0 +1,10 @@
# The server-based syntax can be used to override options:
# ------------------------------------
server "web-server.local",
user: "feenix",
roles: %w{web app db},
ssh_options: {
auth_methods: %w(publickey)
# password: "please use keys"
}