forked from roots/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.rb
34 lines (27 loc) · 1010 Bytes
/
deploy.rb
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
34
set :application, 'my_app_name'
set :repo_url, '[email protected]:me/my_repo.git'
# Branch options
# Prompts for the branch name (defaults to current branch)
#ask :branch, -> { `git rev-parse --abbrev-ref HEAD`.chomp }
# Hardcodes branch to always be master
# This could be overridden in a stage config file
set :branch, :master
set :deploy_to, -> { "/srv/www/#{fetch(:application)}" }
set :log_level, :info
# Apache users with .htaccess files:
# it needs to be added to linked_files so it persists across deploys:
# set :linked_files, %w{.env web/.htaccess}
set :linked_files, %w{.env}
set :linked_dirs, %w{web/app/uploads}
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
# Your restart mechanism here, for example:
# execute :service, :nginx, :reload
end
end
end
# The above restart task is not run by default
# Uncomment the following line to run it on deploys if needed
# after 'deploy:publishing', 'deploy:restart'