Skip to content

Instantly share code, notes, and snippets.

@symm
Last active October 12, 2015 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save symm/4058826 to your computer and use it in GitHub Desktop.
Save symm/4058826 to your computer and use it in GitHub Desktop.
Capifony config for Symfony 2.1 Project Deployment
set :application, "symfony"
set :domain, "#{application}.yourdomain.com"
set :deploy_to, "/www/#{domain}"
set :app_path, "app"
set :user, "yourusername"
set :repository, "file:///local/path/to/project/repo"
set :scm, :git
set :deploy_via, :copy
set :model_manager, "doctrine"
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Symfony2 migrations will run
set :use_sudo, false
set :keep_releases, 3
set :shared_files, ["app/config/parameters.yml"]
set :shared_children, [app_path + "/logs", web_path + "/uploads", "vendor"]
set :use_composer, true
set :update_vendors, true
set :vendors_mode, :install
set :dump_assetic_assets, true
set :writable_dirs, ["app/cache", app_path + "/logs"]
set :webserver_user, "apache"
set :permission_method, :acl
# Ensure that our logs + cache get the proper permissions during deploy.
before "symfony:cache:warmup", "deploy:set_permissions"
after "deploy", "deploy:cleanup"
# Be more verbose by uncommenting the following line
logger.level = Logger::MAX_LEVEL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment