Created
February 15, 2016 08:51
-
-
Save sibsfinx/f64277589f829c82b1c7 to your computer and use it in GitHub Desktop.
bower deploy setup
This file contains hidden or 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
{ | |
"directory" : "vendor/assets/components", | |
"json" : "bower.json" | |
} |
This file contains hidden or 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
# config/applicaton.rb | |
config.assets.paths << Rails.root.join('vendor', 'assets', 'components') |
This file contains hidden or 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
{ | |
"name": "app", | |
"version": "0.0.0", | |
"homepage": "https://github.com/user/app.git", | |
"authors": [ | |
"Alexander Mescheryakov <[email protected]>" | |
], | |
"license": "MIT", | |
"ignore": [ | |
"**/.*", | |
"node_modules", | |
"bower_components", | |
"test", | |
"tests" | |
], | |
"dependencies": { | |
"bootstrap-sass-official": "bootstrap-sass-official#~3.3.5", | |
"jquery": "~2.1.4", | |
"jquery.role": "git://github.com/kossnocorp/role", | |
"lodash": "~3.10.1", | |
"photoswipe": "~4.1.0", | |
"webfontloader": "[email protected]:typekit/webfontloader.git#~1.6.6", | |
"font-awesome": "~4.5.0" | |
}, | |
"devDependencies": { | |
"compass-mixins": "~1.0.2" | |
} | |
} |
This file contains hidden or 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 set up stages | |
require 'capistrano/setup' | |
# Include default deployment tasks | |
require 'capistrano/deploy' | |
# Include tasks from other gems included in your Gemfile | |
# | |
# For documentation on these, see for example: | |
# https://github.com/capistrano/rbenv | |
# https://github.com/capistrano/chruby | |
# https://github.com/capistrano/bundler | |
# https://github.com/capistrano/rails | |
# | |
require 'capistrano/rbenv' | |
# require 'capistrano/chruby' | |
require 'capistrano/bundler' | |
require 'capistrano/rails/assets' | |
require 'capistrano/rails/migrations' | |
require 'capistrano/puma' | |
require 'capistrano/bower' | |
require 'capistrano/rails/console' | |
require 'capistrano-db-tasks' | |
require 'capistrano/rails_tail_log' | |
# require 'capistrano/sitemap_generator' | |
# Load custom tasks from `lib/capistrano/tasks` if you have any defined | |
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } |
This file contains hidden or 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
# config/deploy.rb | |
lock '3.4.0' | |
set :application, 'app' | |
set :repo_url, '[email protected]:user/repo-url.git' | |
#set :branch, ENV['BRANCH'] || 'master' | |
ask :branch, ENV["BRANCH"] || 'master' | |
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp | |
set :deploy_to, '/home/wwwuser/user' | |
set :bower_bin, '/home/wwwuser/.nvm/versions/node/v0.12.7/bin/bower' | |
# Default value for :format is :pretty | |
# set :format, :pretty | |
# Default value for :log_level is :debug | |
# set :log_level, :debug | |
# Default value for :pty is false | |
# set :pty, true | |
# Default value for :linked_files is [] | |
# set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml') | |
set :linked_files, %w{config/database.yml} | |
# Default value for linked_dirs is [] | |
# set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system') | |
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/uploads} | |
# Default value for default_env is {} | |
# set :default_env, { path: "/opt/ruby/bin:$PATH" } | |
# Default value for keep_releases is 5 | |
# set :keep_releases, 5 | |
set :rbenv_type, :user | |
set :rbenv_ruby, '2.2.2' | |
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec" | |
set :rbenv_roles, :all | |
set :puma_init_active_record, true | |
set :assets_dir, %w(public/uploads) | |
set :local_assets_dir, %w(public/uploads) | |
namespace :deploy do | |
after :restart, :clear_cache do | |
on roles(:web), in: :groups, limit: 3, wait: 10 do | |
# Here we can do anything such as: | |
# within release_path do | |
# execute :rake, 'cache:clear' | |
# end | |
end | |
end | |
end |
This file contains hidden or 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
gem 'capistrano-bower' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment