user1961082
user1961082

Reputation: 1035

Symfony2 + GitFlow + Capifony + Capistrano-ext

I'm currently developing a website using Symfony2 and Gitflow. I have 2 external servers called 'development', 'staging' and 'production' and a central GIT repository on Github.

I'm looking to use Capifony to:

I've been reading this page about multistage deployment and so far have installed capifony with the capistrano extension.

Within my /app/config/deploy.rb file I have the following:

set :stage_dir, 'app/config/deploy' # needed for Symfony2 only
require 'capistrano/ext/multistage'
set :stages, %w(production staging development)

set :application, "MyApp"

set :repository,  "[email protected]:MyCompany/#{application}.git"
set :scm,         :git

set  :keep_releases,  3

I've then got a separate /app/config/development.rb file with the following:

server 'SERVER_IP - PORT NUMBER', :app, :web, :primary => true
set :deploy_to, "/var/www/MyApp/" #directory on server
set :symfony_env_prod, "test"

However, if I run cap development deploy I get an error

the task `development' does not exist

Can someone explain what the 'task' refers to?

Thanks

Upvotes: 3

Views: 686

Answers (1)

MDrollette
MDrollette

Reputation: 6927

Move require 'capistrano/ext/multistage' to the very last line of deploy.rb or at least move the set :stages, %w(production staging development) before it.

Upvotes: 1

Related Questions