自动化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