default_run_options[:pty] = true  # Must be set for the password prompt from git to work
set :ssh_options, { :forward_agent => true }

set :user,        "smash"
set :application, "SMASH! Join Us"
set :domain,      "linode.smash.org.au"
set :deploy_to,   "/var/www/smash.org.au/2014-staff-call"
set :shared_path, "#{deploy_to}/shared"
set :use_sudo, false
 
set :scm,        :git
set :repository,  "file://." # Reads from the local git repo, sends it to the server.
set :branch,     'master'
set :deploy_via, :copy
 
role :web, domain
role :app, domain # this can be the same as the web server
role :db,  domain, :primary => true # this can be the same as the web server
 
namespace :deploy do
  task :start do ; end
  task :stop do ; end
  task :restart do ; end
end
 
# The task below serves the purpose of creating symlinks for asset files.
# Large asset files like user uploaded contents and images should not be checked into the repository anyway, so you should move them to a shared location.
 
task :create_symlinks, :roles => :web do

end

# Let's run the task immediately after the deployment is finalised.
 
after "deploy:finalize_update", :create_symlinks