-
Notifications
You must be signed in to change notification settings - Fork 0
/
Capfile
33 lines (27 loc) · 943 Bytes
/
Capfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require "railsless-deploy"
require "shellwords"
# Capistrano
set :application, "organizer.sf.blolol.com"
set :repository, "git://github.com/raws/sf-organizer.git"
set :scm, :git
set :deploy_via, :remote_cache
set :use_sudo, false
ssh_options[:forward_agent] = true
default_run_options[:env] = { "PATH" => "/opt/bin:/opt/sbin:$PATH" }
# Server
role :web, "192.168.1.103"
namespace :deploy do
task :create_config do
config_dir_path = File.join(shared_path, "config").shellescape
run "mkdir -p #{config_dir_path} && chmod -R 777 #{config_dir_path}"
end
task :symlink_config do
original = File.join(shared_path, "config").chomp("/").shellescape
link = File.join(release_path, "config").chomp("/").shellescape
run "rm -fr #{link} && ln -fs #{original} #{link}"
end
task :migrate do; end
task :restart do; end
end
after "deploy:setup", "deploy:create_config"
after "deploy:symlink", "deploy:symlink_config"