Skip to content

Instantly share code, notes, and snippets.

@miukki
Last active May 17, 2019 05:00
Show Gist options
  • Save miukki/d8ecd8846fe7ea85d82f7e4779fc2f16 to your computer and use it in GitHub Desktop.
Save miukki/d8ecd8846fe7ea85d82f7e4779fc2f16 to your computer and use it in GitHub Desktop.
Capistrano / deploy frontend/backend assets
# config valid only for current version of Capistrano
lock '3.6.1'
set :application, 'eic-lisa-web'
set :repo_url, '[email protected]:Prepsmith/eic-lisa-web.git'
set :deploy_to, '/home/eic/static/lisa'
set :linked_dirs, fetch(:linked_dirs, []).push('node_modules', 'bower_components')
set :linked_files, fetch(:linked_files, []).push('yarn.lock')
set :keep_releases, 2
set :global_assets_path, "#{shared_path}/bower_components/prepsmith_global_assets"
namespace :deploy do
after :updated, "yarn:install_dependencies_first"
after :updated, "yarn:install"
after :updated, "bower:install"
# after :updated, "bower:update"
after :updated, "yarn:install_global_assets"
after :updated, "bower:install_global_assets"
after :updated, "grunt:compile_global_assets"
after :updated, "grunt:release"
after :updated, "new_relic:link"
after :finished, "nginx:reload"
end
# config valid only for current version of Capistrano
lock '3.6.1'
set :application, 'eic-lisa-web'
set :repo_url, '[email protected]:Prepsmith/eic-lisa-web.git'
set :deploy_to, '/home/eic/static/lisa'
set :linked_dirs, fetch(:linked_dirs, []).push('node_modules', 'bower_components')
set :linked_files, fetch(:linked_files, []).push('yarn.lock')
set :keep_releases, 2
set :global_assets_path, "#{shared_path}/bower_components/prepsmith_global_assets"
namespace :deploy do
after :updated, "yarn:install_dependencies_first"
after :updated, "yarn:install"
after :updated, "bower:install"
# after :updated, "bower:update"
after :updated, "yarn:install_global_assets"
after :updated, "bower:install_global_assets"
after :updated, "grunt:compile_global_assets"
after :updated, "grunt:release"
after :updated, "new_relic:link"
after :finished, "nginx:reload"
end
set :branch, 'develop'
server 'lisa.staging.prepsmith.com', user: 'eic', roles: %w{web}
set :branch, 'master'
server 'lisa.prepsmith.com', user: 'eic', roles: %w{web}
set :branch, 'develop'
server 'lisa.staging.prepsmith.com', user: 'eic', roles: %w{web}
set :branch, 'testing'
set :deploy_to, '/home/eic/static/testing/lisa'
# global_assets_path need to be redefined as deploy_to is redefined here
set :global_assets_path, "#{shared_path}/bower_components/prepsmith_global_assets"
server 'lisa.testing.prepsmith.com', user: 'eic', roles: %w{web}
set :branch, 'testing'
set :deploy_to, '/home/eic/static/testing/lisa'
# global_assets_path need to be redefined as deploy_to is redefined here
set :global_assets_path, "#{shared_path}/bower_components/prepsmith_global_assets"
server 'lisa.testing.prepsmith.com', user: 'eic', roles: %w{web}
set :branch, 'master'
server 'lisa.prepsmith.com', user: 'eic', roles: %w{web}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment