Capistrano提示项目域名

时间:2009-05-07 19:19:31

标签: ruby deployment capistrano

我目前正在使用Capistrano以及多级扩展来管理部署。即使在config / deploy / stage.rb中设置了:domain,当调用'cap stage deploy'时,它也会提示我输入项目的域名。缺少什么设置?

这是我的deploy.rb

set :stages, %w(vm rtpstage ciscostage ciscodemo hp)

require 'deprec'
require 'capistrano/ext/multistage'
require 'lib/monit_recipes'

set :application, "systems"
set :repository,  "git://github.com/mdwrigh2/systems.git"


# If you aren't using Subversion to manage your source code, specify
# your SCM below:
set :scm, :git

set :user, "rails"
default_run_options[:pty] = true


set :ruby_vm_type,      :mri        # :ree, :mri
set :web_server_type,   :apache     # :apache, :nginx
set :app_server_type,   :mongrel  # :passenger, :mongrel
set :db_server_type,    :mysql      # :mysql, :postgresql, :sqlite


# set :packages_for_project, %w(libmagick9-dev imagemagick libfreeimage3) # list of packages to be installed
# set :gems_for_project, %w(rmagick mini_magick image_science) # list of gems to be installed

# Update these if you're not running everything on one host.

# If you aren't deploying to /opt/apps/#{application} on the target
# servers (which is the deprec default), you can specify the actual location
# via the :deploy_to variable:
# set :deploy_to, "/opt/apps/#{application}"

namespace :deploy do
  task :restart, :roles => :app, :except => { :no_release => true } do
    top.deprec.app.restart
  end
end

这是我的vm.rb

set :domain, "juicy.vm"
role :app, "juicy.vm"
role :web, "juicy.vm"
role :db,  "juicy.vm", :primary => true
role :monitor, "juicy.vm"

1 个答案:

答案 0 :(得分:0)

我只是猜测(因为我没有使用那个多级扩展),但你不应该把实际阶段放在cap命令中吗?例如,如果您的阶段被称为vm,那么您应该键入“cap vm deploy”而不是“cap stage deploy”???