Last active
November 5, 2019 01:59
-
-
Save swalkinshaw/7892821 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
# Includes default deployment tasks | |
require 'capistrano/deploy' | |
# Custom tasks | |
require 'capistrano/composer' | |
require 'capistrano/npm' | |
require 'capistrano/grunt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, 'roots.io' | |
set :repo_url, '[email protected]:retlehs/roots.io.git' | |
set :branch, :master | |
set :deploy_to, '/srv/www/roots.io' | |
set :log_level, :info | |
set :pty, true | |
set :linked_dirs, %w{media} | |
set :linked_files, %w{.env} | |
set :theme_path, "#{release_path}/app/themes/roots" | |
set :npm_target_path, fetch(:theme_path) | |
set :grunt_target_path, fetch(:theme_path) | |
namespace :deploy do | |
desc 'Restart application' | |
task :restart do | |
on roles(:app) do | |
sudo 'service', 'nginx', 'reload' | |
end | |
end | |
end | |
before 'deploy:updated', 'grunt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'capistrano', '~> 3.0.1' | |
gem 'capistrano-composer' | |
gem 'capistrano-npm' | |
gem 'capistrano-grunt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :stage, :production | |
server 'roots.io', user: 'deploy', roles: %w{web app db} | |
set :ssh_options, { | |
forward_agent: true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :stage, :staging | |
server 'roots.dev', user: 'vagrant', roles: %w{web app db} | |
# Vagrant specific | |
set :ssh_options, { | |
keys: %w(~/.vagrant.d/insecure_private_key) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment