Skip to content

Instantly share code, notes, and snippets.

@Raistlfiren
Created November 10, 2015 19:43
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 Raistlfiren/767e3f6d0eda2f15a022 to your computer and use it in GitHub Desktop.
Save Raistlfiren/767e3f6d0eda2f15a022 to your computer and use it in GitHub Desktop.
app/config/deploy.rb
set :application, "Test Application"
set :domain, "domain.com"
set :deploy_to, "/home/user/www/directory"
set :app_path, "app"
set :repository, "git@github.com/..."
set :scm, :git
set :scm_verbose, :true
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none`
set :model_manager, "doctrine"
# Or: `propel`
role :web, domain # Your HTTP server, Apache/etc
role :app, domain, :primary => true # This may be the same as your `Web` server
set :keep_releases, 3
set :dump_assetic_assets, true
set :use_composer, true
set :shared_files, ["app/config/parameters.yml"]
set :shared_children, [app_path + "/logs", web_path + "/uploads", "vendor", app_path + "/sessions"]
set :use_sudo, false
set :user, "davident"
set :writable_dirs, ["app/cache", "app/logs", "app/sessions"]
set :webserver_user, "davident"
set :permission_method, :chmod
set :use_set_permissions, true
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
# Be more verbose by uncommenting the following line
logger.level = Logger::MAX_LEVEL
namespace :myproject do
desc "Fix file permissions"
task :fix_file_permissions, :roles => [ :app, :db, :web ] do
run "chmod -R g-w #{release_path}"
end
end
after "deploy:symlink", "myproject:fix_file_permissions"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment