mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Make sure deploy:cold also runs migrations before starting the app. Have the capify script emit a commented :deploy_to setting.
git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6591 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
c472b3641f
commit
0964dc188c
3 changed files with 15 additions and 8 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* deploy:cold should also run migrations before starting the app [Jamis Buck]
|
||||
|
||||
* Make the copy strategy check out to a temporary directory [Jamis Buck]
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,11 @@ files = {
|
|||
set :application, "set your application name here"
|
||||
set :repository, "set your repository location here"
|
||||
|
||||
# If you aren't deploying to /u/apps/\#{application} on the target
|
||||
# servers (which is the default), you can specify the actual location
|
||||
# via the :deploy_to variable:
|
||||
# set :deploy_to, "/var/www/\#{application}"
|
||||
|
||||
# If you aren't using Subversion to manage your source code, specify
|
||||
# your SCM below:
|
||||
# set :scm, :subversion
|
||||
|
|
|
@ -244,11 +244,10 @@ namespace :deploy do
|
|||
deployed version of the app. However, you can specify a different release \
|
||||
via the migrate_target variable, which must be one of :latest (for the \
|
||||
default behavior), or :current (for the release indicated by the \
|
||||
`current' symlink). latest release to be deployed with the update_code \
|
||||
task). Strings will work for those values instead of symbols, too. You \
|
||||
can also specify additional environment variables to pass to rake via the \
|
||||
migrate_env variable. Finally, you can specify the full path to the rake \
|
||||
executable by setting the rake variable. The defaults are:
|
||||
`current' symlink). Strings will work for those values instead of symbols,
|
||||
too. You can also specify additional environment variables to pass to rake
|
||||
via the migrate_env variable. Finally, you can specify the full path to the
|
||||
rake executable by setting the rake variable. The defaults are:
|
||||
|
||||
set :rake, "rake"
|
||||
set :rails_env, "production"
|
||||
|
@ -347,12 +346,13 @@ namespace :deploy do
|
|||
desc <<-DESC
|
||||
Deploys and starts a `cold' application. This is useful if you have not \
|
||||
deployed your application before, or if your application is (for some \
|
||||
other reason) not currently running. It will deploy the code, and then \
|
||||
instead of invoking `deploy:restart', it will invoke `deploy:app:start' \
|
||||
to fire up the application servers.
|
||||
other reason) not currently running. It will deploy the code, run any \
|
||||
pending migrations, and then instead of invoking `deploy:restart', it will
|
||||
invoke `deploy:app:start' to fire up the application servers.
|
||||
DESC
|
||||
task :cold do
|
||||
update
|
||||
migrate
|
||||
app.start
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue