Update Capistrano configuration
This commit is contained in:
parent
57dc267f78
commit
58484957fa
21
Capfile
21
Capfile
|
@ -1,10 +1,10 @@
|
||||||
# Load DSL and Setup Up Stages
|
# Load DSL and set up stages
|
||||||
require 'capistrano/setup'
|
require 'capistrano/setup'
|
||||||
|
|
||||||
# Includes default deployment tasks
|
# Include default deployment tasks
|
||||||
require 'capistrano/deploy'
|
require 'capistrano/deploy'
|
||||||
|
|
||||||
# Includes tasks from other gems included in your Gemfile
|
# Include tasks from other gems included in your Gemfile
|
||||||
#
|
#
|
||||||
# For documentation on these, see for example:
|
# For documentation on these, see for example:
|
||||||
#
|
#
|
||||||
|
@ -13,16 +13,19 @@ require 'capistrano/deploy'
|
||||||
# https://github.com/capistrano/chruby
|
# https://github.com/capistrano/chruby
|
||||||
# https://github.com/capistrano/bundler
|
# https://github.com/capistrano/bundler
|
||||||
# https://github.com/capistrano/rails
|
# https://github.com/capistrano/rails
|
||||||
|
# https://github.com/capistrano/passenger
|
||||||
#
|
#
|
||||||
# require 'capistrano/rvm'
|
# require 'capistrano/rvm'
|
||||||
# require 'capistrano/rbenv'
|
# require 'capistrano/rbenv'
|
||||||
# require 'capistrano/chruby'
|
# require 'capistrano/chruby'
|
||||||
# require 'capistrano/bundler'
|
require 'capistrano/bundler'
|
||||||
# require 'capistrano/rails/assets'
|
require 'capistrano/rails/assets'
|
||||||
# require 'capistrano/rails/migrations'
|
require 'capistrano/rails/migrations'
|
||||||
|
require 'capistrano/puma'
|
||||||
require 'capistrano/rails'
|
require 'capistrano/puma/nginx' # if you want to upload a nginx site template
|
||||||
|
# require 'capistrano/passenger'
|
||||||
require 'capistrano/rvm'
|
require 'capistrano/rvm'
|
||||||
|
require 'capistrano/git-submodule-strategy'
|
||||||
|
|
||||||
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
|
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
|
||||||
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
|
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
|
||||||
|
|
9
Gemfile
9
Gemfile
|
@ -28,10 +28,6 @@ gem 'phony_rails'
|
||||||
gem 'carrierwave'
|
gem 'carrierwave'
|
||||||
gem 'rmagick'
|
gem 'rmagick'
|
||||||
|
|
||||||
gem 'capistrano'
|
|
||||||
gem 'capistrano-rails'
|
|
||||||
gem 'capistrano-rvm'
|
|
||||||
|
|
||||||
gem 'puma', group: :production
|
gem 'puma', group: :production
|
||||||
|
|
||||||
gem 'globalize'
|
gem 'globalize'
|
||||||
|
@ -60,6 +56,11 @@ group :development do
|
||||||
gem 'hirb'
|
gem 'hirb'
|
||||||
gem 'awesome_print'
|
gem 'awesome_print'
|
||||||
gem 'quiet_assets'
|
gem 'quiet_assets'
|
||||||
|
gem 'capistrano'
|
||||||
|
gem 'capistrano-rails'
|
||||||
|
gem 'capistrano-rvm'
|
||||||
|
gem 'capistrano3-puma'
|
||||||
|
gem 'capistrano-git-submodule-strategy'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
|
|
41
Gemfile.lock
41
Gemfile.lock
|
@ -51,7 +51,7 @@ GEM
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
thread_safe (~> 0.3, >= 0.3.4)
|
thread_safe (~> 0.3, >= 0.3.4)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
arel (6.0.2)
|
arel (6.0.3)
|
||||||
autoprefixer-rails (5.2.1.1)
|
autoprefixer-rails (5.2.1.1)
|
||||||
execjs
|
execjs
|
||||||
json
|
json
|
||||||
|
@ -72,12 +72,17 @@ GEM
|
||||||
capistrano-bundler (1.1.4)
|
capistrano-bundler (1.1.4)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
sshkit (~> 1.2)
|
sshkit (~> 1.2)
|
||||||
|
capistrano-git-submodule-strategy (0.1.17)
|
||||||
|
capistrano (~> 3.1)
|
||||||
capistrano-rails (1.1.3)
|
capistrano-rails (1.1.3)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
capistrano-bundler (~> 1.1)
|
capistrano-bundler (~> 1.1)
|
||||||
capistrano-rvm (0.1.2)
|
capistrano-rvm (0.1.2)
|
||||||
capistrano (~> 3.0)
|
capistrano (~> 3.0)
|
||||||
sshkit (~> 1.2)
|
sshkit (~> 1.2)
|
||||||
|
capistrano3-puma (1.1.0)
|
||||||
|
capistrano (~> 3.0)
|
||||||
|
puma (>= 2.6)
|
||||||
capybara (2.4.4)
|
capybara (2.4.4)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
nokogiri (>= 1.3.3)
|
nokogiri (>= 1.3.3)
|
||||||
|
@ -103,7 +108,7 @@ GEM
|
||||||
currencies (~> 0.4.2)
|
currencies (~> 0.4.2)
|
||||||
i18n_data (~> 0.7.0)
|
i18n_data (~> 0.7.0)
|
||||||
currencies (0.4.2)
|
currencies (0.4.2)
|
||||||
devise (3.5.1)
|
devise (3.5.2)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
railties (>= 3.2.6, < 5)
|
railties (>= 3.2.6, < 5)
|
||||||
|
@ -130,12 +135,12 @@ GEM
|
||||||
font-awesome-sass (4.3.2.1)
|
font-awesome-sass (4.3.2.1)
|
||||||
sass (~> 3.2)
|
sass (~> 3.2)
|
||||||
formatador (0.2.5)
|
formatador (0.2.5)
|
||||||
globalid (0.3.5)
|
globalid (0.3.6)
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
globalize (5.0.1)
|
globalize (5.0.1)
|
||||||
activemodel (>= 4.2.0, < 4.3)
|
activemodel (>= 4.2.0, < 4.3)
|
||||||
activerecord (>= 4.2.0, < 4.3)
|
activerecord (>= 4.2.0, < 4.3)
|
||||||
guard (2.12.8)
|
guard (2.13.0)
|
||||||
formatador (>= 0.2.4)
|
formatador (>= 0.2.4)
|
||||||
listen (>= 2.7, <= 4.0)
|
listen (>= 2.7, <= 4.0)
|
||||||
lumberjack (~> 1.0)
|
lumberjack (~> 1.0)
|
||||||
|
@ -145,20 +150,20 @@ GEM
|
||||||
shellany (~> 0.0)
|
shellany (~> 0.0)
|
||||||
thor (>= 0.18.1)
|
thor (>= 0.18.1)
|
||||||
guard-compat (1.2.1)
|
guard-compat (1.2.1)
|
||||||
guard-rspec (4.6.2)
|
guard-rspec (4.6.4)
|
||||||
guard (~> 2.1)
|
guard (~> 2.1)
|
||||||
guard-compat (~> 1.1)
|
guard-compat (~> 1.1)
|
||||||
rspec (>= 2.99.0, < 4.0)
|
rspec (>= 2.99.0, < 4.0)
|
||||||
highline (1.7.2)
|
highline (1.7.3)
|
||||||
hirb (0.7.3)
|
hirb (0.7.3)
|
||||||
i18n (0.7.0)
|
i18n (0.7.0)
|
||||||
i18n-tasks (0.8.5)
|
i18n-tasks (0.8.7)
|
||||||
activesupport
|
activesupport (>= 2.3.18)
|
||||||
easy_translate (>= 0.5.0)
|
easy_translate (>= 0.5.0)
|
||||||
erubis
|
erubis
|
||||||
highline
|
highline (>= 1.7.3)
|
||||||
i18n
|
i18n
|
||||||
term-ansicolor
|
term-ansicolor (>= 1.3.2)
|
||||||
terminal-table (>= 1.5.1)
|
terminal-table (>= 1.5.1)
|
||||||
i18n_data (0.7.0)
|
i18n_data (0.7.0)
|
||||||
jquery-datatables-rails (3.3.0)
|
jquery-datatables-rails (3.3.0)
|
||||||
|
@ -172,7 +177,7 @@ GEM
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
json (1.8.3)
|
json (1.8.3)
|
||||||
libv8 (3.16.14.11)
|
libv8 (3.16.14.11)
|
||||||
listen (3.0.2)
|
listen (3.0.3)
|
||||||
rb-fsevent (>= 0.9.3)
|
rb-fsevent (>= 0.9.3)
|
||||||
rb-inotify (>= 0.9)
|
rb-inotify (>= 0.9)
|
||||||
loofah (2.0.2)
|
loofah (2.0.2)
|
||||||
|
@ -183,7 +188,7 @@ GEM
|
||||||
method_source (0.8.2)
|
method_source (0.8.2)
|
||||||
mime-types (2.6.1)
|
mime-types (2.6.1)
|
||||||
mini_portile (0.6.2)
|
mini_portile (0.6.2)
|
||||||
minitest (5.7.0)
|
minitest (5.8.0)
|
||||||
morrisjs-rails (0.5.1)
|
morrisjs-rails (0.5.1)
|
||||||
railties (> 3.1, < 5)
|
railties (> 3.1, < 5)
|
||||||
nenv (0.2.0)
|
nenv (0.2.0)
|
||||||
|
@ -193,12 +198,12 @@ GEM
|
||||||
net-ssh (2.9.2)
|
net-ssh (2.9.2)
|
||||||
nokogiri (1.6.6.2)
|
nokogiri (1.6.6.2)
|
||||||
mini_portile (~> 0.6.0)
|
mini_portile (~> 0.6.0)
|
||||||
notiffany (0.0.6)
|
notiffany (0.0.7)
|
||||||
nenv (~> 0.1)
|
nenv (~> 0.1)
|
||||||
shellany (~> 0.0)
|
shellany (~> 0.0)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
pg (0.18.2)
|
pg (0.18.2)
|
||||||
phony (2.14.10)
|
phony (2.14.13)
|
||||||
phony_rails (0.12.9)
|
phony_rails (0.12.9)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
countries (~> 0.11, >= 0.11.5)
|
countries (~> 0.11, >= 0.11.5)
|
||||||
|
@ -209,7 +214,7 @@ GEM
|
||||||
slop (~> 3.4)
|
slop (~> 3.4)
|
||||||
pry-rails (0.3.4)
|
pry-rails (0.3.4)
|
||||||
pry (>= 0.9.10)
|
pry (>= 0.9.10)
|
||||||
puma (2.12.2)
|
puma (2.12.3)
|
||||||
quiet_assets (1.1.0)
|
quiet_assets (1.1.0)
|
||||||
railties (>= 3.1, < 5.0)
|
railties (>= 3.1, < 5.0)
|
||||||
rack (1.6.4)
|
rack (1.6.4)
|
||||||
|
@ -232,7 +237,7 @@ GEM
|
||||||
activesupport (>= 4.2.0.beta, < 5.0)
|
activesupport (>= 4.2.0.beta, < 5.0)
|
||||||
nokogiri (~> 1.6.0)
|
nokogiri (~> 1.6.0)
|
||||||
rails-deprecated_sanitizer (>= 1.0.1)
|
rails-deprecated_sanitizer (>= 1.0.1)
|
||||||
rails-erd (1.4.1)
|
rails-erd (1.4.2)
|
||||||
activerecord (>= 3.2)
|
activerecord (>= 3.2)
|
||||||
activesupport (>= 3.2)
|
activesupport (>= 3.2)
|
||||||
choice (~> 0.2.0)
|
choice (~> 0.2.0)
|
||||||
|
@ -255,7 +260,7 @@ GEM
|
||||||
ref (2.0.0)
|
ref (2.0.0)
|
||||||
responders (2.1.0)
|
responders (2.1.0)
|
||||||
railties (>= 4.2.0, < 5)
|
railties (>= 4.2.0, < 5)
|
||||||
rmagick (2.15.2)
|
rmagick (2.15.3)
|
||||||
rspec (3.3.0)
|
rspec (3.3.0)
|
||||||
rspec-core (~> 3.3.0)
|
rspec-core (~> 3.3.0)
|
||||||
rspec-expectations (~> 3.3.0)
|
rspec-expectations (~> 3.3.0)
|
||||||
|
@ -350,8 +355,10 @@ DEPENDENCIES
|
||||||
bootstrap-sass-extras
|
bootstrap-sass-extras
|
||||||
bootswatch-rails
|
bootswatch-rails
|
||||||
capistrano
|
capistrano
|
||||||
|
capistrano-git-submodule-strategy
|
||||||
capistrano-rails
|
capistrano-rails
|
||||||
capistrano-rvm
|
capistrano-rvm
|
||||||
|
capistrano3-puma
|
||||||
capybara
|
capybara
|
||||||
carrierwave
|
carrierwave
|
||||||
coffee-rails
|
coffee-rails
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
# config valid only for Capistrano 3.1
|
# config valid only for current version of Capistrano
|
||||||
lock '3.2.1'
|
lock '3.4.0'
|
||||||
|
|
||||||
set :application, 'clarion'
|
set :application, 'clarion'
|
||||||
set :repo_url, 'https://github.com/ignisf/clarion.git'
|
set :repo_url, 'https://github.com/ignisf/clarion.git'
|
||||||
|
|
||||||
# Default branch is :master
|
# Default branch is :master
|
||||||
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call
|
ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
|
||||||
|
|
||||||
# Default deploy_to directory is /var/www/my_app
|
# Default deploy_to directory is /var/www/my_app
|
||||||
set :deploy_to, '/home/barf/clarion'
|
set :deploy_to, '/home/barf/clarion'
|
||||||
|
|
||||||
# Default value for :scm is :git
|
# Default value for :scm is :git
|
||||||
# set :scm, :git
|
# set :scm, :git
|
||||||
|
set :git_strategy, Capistrano::Git::SubmoduleStrategy
|
||||||
|
|
||||||
# Default value for :format is :pretty
|
# Default value for :format is :pretty
|
||||||
# set :format, :pretty
|
# set :format, :pretty
|
||||||
|
@ -23,10 +24,10 @@ set :deploy_to, '/home/barf/clarion'
|
||||||
# set :pty, true
|
# set :pty, true
|
||||||
|
|
||||||
# Default value for :linked_files is []
|
# Default value for :linked_files is []
|
||||||
set :linked_files, %w{config/puma.rb config/database.yml config/secrets.yml}
|
set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
|
||||||
|
|
||||||
# Default value for linked_dirs is []
|
# Default value for linked_dirs is []
|
||||||
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/uploads}
|
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
|
||||||
|
|
||||||
# Default value for default_env is {}
|
# Default value for default_env is {}
|
||||||
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
||||||
|
@ -34,7 +35,17 @@ set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public
|
||||||
# Default value for keep_releases is 5
|
# Default value for keep_releases is 5
|
||||||
# set :keep_releases, 5
|
# set :keep_releases, 5
|
||||||
|
|
||||||
set :rvm_ruby_version, '2.1.3'
|
set :rvm_ruby_version, '2.2.2'
|
||||||
|
|
||||||
|
set :puma_bind, ["tcp://127.0.0.1:9087"]
|
||||||
|
set :puma_init_active_record, true
|
||||||
|
set :puma_access_log, "#{shared_path}/log/puma_access.log"
|
||||||
|
set :puma_error_log, "#{shared_path}/log/puma_error.log"
|
||||||
|
set :puma_preload_app, true
|
||||||
|
|
||||||
|
set :nginx_sites_available_path, "#{shared_path}"
|
||||||
|
set :nginx_sites_enabled_path, "/tmp"
|
||||||
|
set :nginx_server_name, 'cfp.openfest.org'
|
||||||
|
|
||||||
namespace :deploy do
|
namespace :deploy do
|
||||||
|
|
||||||
|
|
|
@ -1,33 +1,53 @@
|
||||||
# Simple Role Syntax
|
# server-based syntax
|
||||||
# ==================
|
|
||||||
# Supports bulk-adding hosts to roles, the primary server in each group
|
|
||||||
# is considered to be the first unless any hosts have the primary
|
|
||||||
# property set. Don't declare `role :all`, it's a meta role.
|
|
||||||
|
|
||||||
|
|
||||||
# Extended Server Syntax
|
|
||||||
# ======================
|
# ======================
|
||||||
# This can be used to drop a more detailed server definition into the
|
# Defines a single server with a list of roles and multiple properties.
|
||||||
# server list. The second argument is a, or duck-types, Hash and is
|
# You can define all roles on a single server, or split them:
|
||||||
# used to set extended properties on the server.
|
|
||||||
|
# server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
|
||||||
|
# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
|
||||||
|
server 'marla.ludost.net', user: 'barf', roles: %w{app db web}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# role-based syntax
|
||||||
|
# ==================
|
||||||
|
|
||||||
|
# Defines a role with one or multiple servers. The primary server in each
|
||||||
|
# group is considered to be the first unless any hosts have the primary
|
||||||
|
# property set. Specify the username and a domain or IP for the server.
|
||||||
|
# Don't use `:all`, it's a meta role.
|
||||||
|
|
||||||
|
# role :app, %w{deploy@example.com}, my_property: :my_value
|
||||||
|
# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
|
||||||
|
# role :db, %w{deploy@example.com}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
server 'marla.ludost.net', user: 'barf', roles: %w{web db app}
|
|
||||||
|
|
||||||
|
|
||||||
# Custom SSH Options
|
# Custom SSH Options
|
||||||
# ==================
|
# ==================
|
||||||
# You may pass any option but keep in mind that net/ssh understands a
|
# You may pass any option but keep in mind that net/ssh understands a
|
||||||
# limited set of options, consult[net/ssh documentation](http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start).
|
# 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
|
# Global options
|
||||||
# --------------
|
# --------------
|
||||||
# set :ssh_options, {
|
set :ssh_options, {
|
||||||
# keys: %w(/home/rlisowski/.ssh/id_rsa),
|
# keys: %w(/home/rlisowski/.ssh/id_rsa),
|
||||||
# forward_agent: false,
|
forward_agent: true,
|
||||||
# auth_methods: %w(password)
|
# auth_methods: %w(password)
|
||||||
# }
|
}
|
||||||
#
|
#
|
||||||
# And/or per server (overrides global)
|
# The server-based syntax can be used to override options:
|
||||||
# ------------------------------------
|
# ------------------------------------
|
||||||
# server 'example.com',
|
# server 'example.com',
|
||||||
# user: 'user_name',
|
# user: 'user_name',
|
||||||
|
|
Loading…
Reference in New Issue