Skip to content

Instantly share code, notes, and snippets.

@gido
Created Dec 11, 2012
Embed
What would you like to do?
Our capifony/capistrano config
# app/config/deploy.rb
#
# Multistage deploy config.
# require capistrano-ext
# see: http://www.zalas.eu/multistage-deployment-of-symfony-applications-with-capifony
#
set :stage_dir, 'app/config/deploy'
require 'capistrano/ext/multistage'
set :stages, %w(production staging)
set :application, "myapp"
set :domain, "server.example.com"
set :app_path, "app"
set :web_path, "web"
set :data_path, "data"
set :user, "myuser"
set :use_sudo, false
set :repository, "git@github.com:antistatique/super-project.git"
set :scm, :git
set :dump_assetic_assets, true
set :model_manager, "doctrine"
set :use_composer, true
# directories that will be shared between all deployments
set :shared_children, [app_path + "/logs", web_path + "/uploads"]
# share our database configuration
set :shared_files, ["app/config/parameters.ini", web_path + "/.htaccess"] # Our .htaccess has special rules for prod
set :keep_releases, 4
# We want to use the ssh key of the user who deploy
ssh_options[:forward_agent] = true
# Be more verbose by uncommenting the following line
# Because some times you have troubles...
# logger.level = Logger::MAX_LEVEL
# app/config/deploy/production.rb
# here our staging and production is on the same server but at different place
set :deploy_to, "/path/to/production/project"
set :branch, "master"
# app/config/deploy/staging.rb
# here our staging and production is on the same server but at different place
set :deploy_to, "/path/to/staging/project"
set :branch, "dev"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment