我是新來與Capistrano的部署和我想以下幾點:Capistrano的 '收割者沒有發現'
deploy.rb:
set :application, "example.co.uk"
# 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, "/home/example/#{application}"
# SCM Options
default_run_options[:pty] = true # Must be set for the password prompt from git to work
ssh_options[:forward_agent] = true # Agent forwarding keys
set :repository, "[email protected]:mongeese/example.git" # Your clone URL
set :scm, "git"
set :branch, "master"
set :deploy_via, :remote_cache
set :user, "james" # The server's user for deploys
role :app, "example.co.uk"
role :web, "example.co.uk"
role :db, "example.co.uk", :primary => true
set :use_sudo, false
我得到以下輸出:
* executing `deploy:restart'
* executing "/home/example/example.co.uk/current/script/process/reaper"
servers: ["example.co.uk"]
[example.co.uk] executing command
** [out :: example.co.uk] sh: /home/example/example.co.uk/current/script/process/reaper: not found
command finished
「james」用戶可以sudo。如果我冒了出來:use_sudo,我得到以下錯誤:
* executing "sudo -p 'sudo password: ' -u app /home/example/example.co.uk/current/script/process/reaper"
servers: ["example.co.uk"]
[example.co.uk] executing command
** [out :: example.co.uk] sudo: unknown user: app
command finished
我顯然缺少的東西完全,因爲谷歌似乎只調高這個老的效果。