我在执行时没有收到任何错误消息cap deploy:setup
。它尝试将文件夹创建/myapp
为mkdir -p /home/user/apps/myapp
,以及其他文件夹(发布、共享)。没有权限问题,因为我可以mkdir -p /home/user/apps/myapp
在终端中执行而不会出现任何错误。此外,cap deploy:check
给出You appear to have all necessary dependencies installed
消息。我应该使用创建这些文件夹cap deploy:setup
吗?如果是这样,为什么我没有收到任何错误消息以及创建的文件夹?
这是我的 config/deploy.rb 文件:
set :application, "myapp"
set :location, "myserver"
set :domain, "apps.mydomain.com"
set :user, "app_admin"
set :repository, "svn+ssh://app_admin@192.168.XXX.XXX/home/svn/myapp"
set :svn_username, "svn_admin"
set :svn_password, "password"
set :use_sudo, false
set :scm, :subversion
default_run_options[:pty] = true
role :web, location
role :app, location
role :db, location, :primary => true
set :deploy_to, "/home/app_admin/#{application}"
set :deploy_via, :checkout
ssh_options[:forward_agent] = true
namespace :deploy do
task :start, :roles => :app do
run "touch #{current_path}/tmp/restart.txt"
end
task :stop, :roles => :app do
#do nothing
end
desc "Restart Application"
task :restart, :roles => :app do
run "touch #{current_path}/tmp/restart.txt"
end
end