mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Updated docs (cap-bundler and Capfile structure)
This commit is contained in:
parent
fc4e3600c1
commit
dfe7d25200
2 changed files with 9 additions and 12 deletions
|
@ -100,9 +100,9 @@
|
|||
v2</a></li>
|
||||
<li class="divider"></li>
|
||||
<h5>Recent Announcements</h5>
|
||||
|
||||
|
||||
<li><a href="/2013/06/01/release-announcement.html"><span class="post-date">01 Jun 2013</span> Capistrano Version 3 Release Announcement</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -112,7 +112,7 @@
|
|||
<p>1.
|
||||
Update your Gemfile: <code>gem 'capistrano', '~> 3.0', require: false, group: :development</code></p>
|
||||
|
||||
<p>If you deploy Rails, you wil also need <code>capistrano-rails</code> gem (Rails integration was moved out from Capistrano 3.x).</p>
|
||||
<p>If you deploy Rails, you wil also need <code>capistrano-rails</code> and <code>capistrano-bundler</code> gems (Rails and Bundler integrations were moved out from Capistrano 3.x).</p>
|
||||
|
||||
<p>2.
|
||||
We recommend to capify the project from scratch and move definitions from old to new configs then.</p>
|
||||
|
@ -137,8 +137,7 @@ mv config/deploy/ old_cap # --> only for multistage setups</code></pre>
|
|||
<p>4.
|
||||
Update <code>config/deploy/production.rb</code> and <code>config/deploy/staging.rb</code> to have relevant data there. You may also want to add more stages from old configs (<code>old_cap/deploy/</code>).</p>
|
||||
|
||||
<p>5.
|
||||
Capistrano 3.x has changed structure of recepies. Before that you put stage-specific code to <code>config/deploy/stage_name.rb</code>, but now <code>config/deploy.rb</code> should contain only global options for all stages. Tasks like restarting Unicorns and preparing configs should now be placed in <code>Capfile</code>.</p>
|
||||
<p>5.</p>
|
||||
|
||||
<p>Now you need to refactor your old <code>deploy.rb</code> (also <code>Capfile</code>, but in most of cases developers didn't change it in Capistrano 2.x). Move parameters (like <code>set :deploy_to, "/home/deploy/#{application}"</code> or <code>set :keep_releases, 4</code>) to <code>config/deploy.rb</code> and tasks to <code>Capfile</code>.</p>
|
||||
|
||||
|
@ -179,7 +178,7 @@ CMD</code></pre>
|
|||
<div>
|
||||
<pre data-line=''><code class='language-ruby'>within fetch(:latest_release_directory)
|
||||
with rails_env: fetch(:rails_env) do
|
||||
execute :rake, 'assets:precompile'
|
||||
execute :rake, 'assets:precompile'
|
||||
end
|
||||
end</code></pre>
|
||||
</div>
|
||||
|
@ -212,7 +211,7 @@ role :db, %w{example.com}</code></pre>
|
|||
<!-- <p>1.
|
||||
Update your Gemfile: <code>gem 'capistrano', '~> 3.0', require: false, group: :development</code></p>
|
||||
|
||||
<p>If you deploy Rails, you wil also need <code>capistrano-rails</code> gem (Rails integration was moved out from Capistrano 3.x).</p>
|
||||
<p>If you deploy Rails, you wil also need <code>capistrano-rails</code> and <code>capistrano-bundler</code> gems (Rails and Bundler integrations were moved out from Capistrano 3.x).</p>
|
||||
|
||||
<p>2.
|
||||
We recommend to capify the project from scratch and move definitions from old to new configs then.</p>
|
||||
|
@ -237,8 +236,7 @@ mv config/deploy/ old_cap # --> only for multistage setups</code></pre>
|
|||
<p>4.
|
||||
Update <code>config/deploy/production.rb</code> and <code>config/deploy/staging.rb</code> to have relevant data there. You may also want to add more stages from old configs (<code>old_cap/deploy/</code>).</p>
|
||||
|
||||
<p>5.
|
||||
Capistrano 3.x has changed structure of recepies. Before that you put stage-specific code to <code>config/deploy/stage_name.rb</code>, but now <code>config/deploy.rb</code> should contain only global options for all stages. Tasks like restarting Unicorns and preparing configs should now be placed in <code>Capfile</code>.</p>
|
||||
<p>5.</p>
|
||||
|
||||
<p>Now you need to refactor your old <code>deploy.rb</code> (also <code>Capfile</code>, but in most of cases developers didn't change it in Capistrano 2.x). Move parameters (like <code>set :deploy_to, "/home/deploy/#{application}"</code> or <code>set :keep_releases, 4</code>) to <code>config/deploy.rb</code> and tasks to <code>Capfile</code>.</p>
|
||||
|
||||
|
@ -279,7 +277,7 @@ CMD</code></pre>
|
|||
<div>
|
||||
<pre data-line=''><code class='language-ruby'>within fetch(:latest_release_directory)
|
||||
with rails_env: fetch(:rails_env) do
|
||||
execute :rake, 'assets:precompile'
|
||||
execute :rake, 'assets:precompile'
|
||||
end
|
||||
end</code></pre>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@ layout: default
|
|||
Update your Gemfile: `gem 'capistrano', '~> 3.0', require: false, group: :development`
|
||||
|
||||
|
||||
If you deploy Rails, you wil also need `capistrano-rails` gem (Rails integration was moved out from Capistrano 3.x).
|
||||
If you deploy Rails, you wil also need `capistrano-rails` and `capistrano-bundler` gems (Rails and Bundler integrations were moved out from Capistrano 3.x).
|
||||
|
||||
2.
|
||||
We recommend to capify the project from scratch and move definitions from old to new configs then.
|
||||
|
@ -33,7 +33,6 @@ layout: default
|
|||
Update `config/deploy/production.rb` and `config/deploy/staging.rb` to have relevant data there. You may also want to add more stages from old configs (`old_cap/deploy/`).
|
||||
|
||||
5.
|
||||
Capistrano 3.x has changed structure of recepies. Before that you put stage-specific code to `config/deploy/stage_name.rb`, but now `config/deploy.rb` should contain only global options for all stages. Tasks like restarting Unicorns and preparing configs should now be placed in `Capfile`.
|
||||
|
||||
Now you need to refactor your old `deploy.rb` (also `Capfile`, but in most of cases developers didn't change it in Capistrano 2.x). Move parameters (like `set :deploy_to, "/home/deploy/#{application}"` or `set :keep_releases, 4`) to `config/deploy.rb` and tasks to `Capfile`.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue