自動化Zend Framework的應用程序部署我一直在掙扎Capistrano的對於過去幾個小時Zend框架應用程序自動部署。會喜歡一些指導。使用Capistrano的
我的目錄結構如下
<project name>/
Capfile
application/
configs/
deploy/
staging.rb
application.ini
deploy.rb
controllers/
models/
.
.
.
other framework folders and files
我Capfile是
require 'rubygems'
require 'railsless-deploy'
require 'capistrano/ext/multistage'
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
我deploy.rb是(SCM信息略)
set :application, "App"
set :stages, %w(staging production)
set :default_stage, "staging"
set :stages_dir, "application/configs/deploy/"
default_run_options[:pty] = true
set :deploy_via, :remote_cache
set :scm, "git"
set :ssh_options, {:forward_agent => true}
set :repository, "[email protected]:<details>"
set :branch, "staging"
而且我staging.rb內我的部署文件夾(略憑證)
role :app, "host name"
role :web, "host name"
role :db, "host name", :primary => true
set :deploy_to, "/httpdocs/"
set :user, "username"
set :password, "password"
我使用的是VPS,但我不認爲我在哪裏,我需要在服務器端調試階段。 Capistrano說,即使我定義它,它也不能檢測到分期任務。錯誤是
triggering load callbacks
the task `staging' does not exist
我在做什麼錯了?
謝謝!
並沒有什麼幫助。我仍然得到同樣的錯誤。 – Satyam 2012-03-14 16:46:09
我編輯了我的答案,以包含另一個想法 – 2012-03-14 22:40:21