forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
393 changed files
with
197 additions
and
207,498 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,93 @@ | ||
# required for typing in a password for sudo | ||
default_run_options[:pty] = true | ||
# config valid only for Capistrano 3.1 | ||
lock '3.4.0' | ||
|
||
set :stage, "stage-hostname" | ||
set :user, "SSHUserOnStage" | ||
set :flex_release, "stage" | ||
set :application, 'bioportal_web_ui' | ||
|
||
set :application, "BioPortal" | ||
set :repository, "https://bmir-gforge.stanford.edu/svn/bioportalui/trunk" | ||
set :svn_username, "anonymous" | ||
set :svn_password, "anonymous_ncbo" | ||
set :repo_url, "git@github.com:ncbo/#{fetch(:application)}.git" | ||
|
||
set :scm, :subversion | ||
#set :deploy_via, :remote_cache | ||
|
||
# If you aren't deploying to /u/apps/#{application} on the target | ||
# servers (which is the default), you can specify the actual location | ||
# via the :deploy_to variable: | ||
set :deploy_to, "/var/rails/#{application}" | ||
# Default branch is :master | ||
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp } | ||
NCBO_BRANCH = ENV.include?('NCBO_BRANCH') ? ENV['NCBO_BRANCH'] : 'staging' | ||
set :branch, "#{NCBO_BRANCH}" | ||
|
||
# stage | ||
server stage, :app, :web, :db, :primary => true | ||
# Default deploy_to directory is /var/www/my_app | ||
set :deploy_to, "/srv/rails/#{fetch(:application)}" | ||
|
||
# production | ||
#role :app, "ror-prod1.example.org" | ||
#role :web, "ror-prod1.example.org" | ||
#role :db, "ror-prod1.example.org", :primary => true | ||
# Default value for :scm is :git | ||
# set :scm, :git | ||
|
||
# svn export --force --username anonymous --password anonymous_ncbo https://bmir-gforge.stanford.edu/svn/flexviz/tags/$flexrelease/flex $destination/public/flex | ||
# 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, %w{config/bioportal_config.rb config/database.yml public/robots.txt config/newrelic.yml} | ||
|
||
# Default value for linked_dirs is [] | ||
set :linked_dirs, %w{bin log tmp/pids tmp/cache public/system public/assets config/locales} | ||
|
||
# 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 :bundle_flags, '--without development test --deployment' | ||
|
||
#If you want to restart using `touch tmp/restart.txt`, add this to your config/deploy.rb: | ||
|
||
set :passenger_restart_with_touch, true | ||
#If you want to restart using `passenger-config restart-app`, add this to your config/deploy.rb: | ||
#set :passenger_restart_with_touch, false # Note that `nil` is NOT the same as `false` here | ||
#If you don't set `:passenger_restart_with_touch`, capistrano-passenger will check what version of passenger you are running | ||
#and use `passenger-config restart-app` if it is available in that version. | ||
|
||
# If you are using Passenger mod_rails uncomment this: | ||
namespace :deploy do | ||
task :start do ; end | ||
task :stop do ; end | ||
task :restart, :roles => :app, :except => { :no_release => true } do | ||
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" | ||
|
||
desc 'Incorporate the bioportal_conf private repository content' | ||
#Get cofiguration from repo if ENV NCBO_CONFIG_REPO is set | ||
#(should be set to NCBO private config repo) | ||
task :get_config do | ||
if ENV.include?('NCBO_CONFIG_REPO') | ||
PRIVATE_REPO = ENV['NCBO_CONFIG_REPO'] | ||
CONFIG_PATH = "/tmp/#{SecureRandom.hex(15)}" | ||
on roles(:web) do | ||
execute "git clone -q #{PRIVATE_REPO} #{CONFIG_PATH}" | ||
execute "rsync -av #{CONFIG_PATH}/#{fetch(:application)}/ #{fetch(:deploy_to)}/shared" | ||
execute "rm -rf #{CONFIG_PATH}" | ||
## Modify the bioportal_config.rb file for DEPLOY_TARGET on the remote system | ||
# cfg_file = File.join(release_path, "config", "bioportal_config.rb") | ||
# sed_cmd = "\'s/^deploy_target =.*/deploy_target = \"#{DEPLOY_TARGET}\"/\'" | ||
# execute "sed -i -e #{sed_cmd} #{cfg_file}" | ||
end | ||
end | ||
end | ||
end | ||
|
||
desc 'Restart application' | ||
task :restart do | ||
on roles(:web), in: :sequence, wait: 5 do | ||
# Your restart mechanism here, for example: | ||
execute :touch, release_path.join('tmp/restart.txt') | ||
end | ||
end | ||
|
||
before :started, :get_config | ||
after :publishing, :restart | ||
|
||
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Simple Role Syntax | ||
# ================== | ||
# Supports bulk-adding hosts to roles, the primary | ||
# server in each group is considered to be the first | ||
# unless any hosts have the primary property set. | ||
# Don't declare `role :all`, it's a meta role | ||
role :app, %w{deploy@example.com} | ||
role :web, %w{deploy@example.com} | ||
role :db, %w{deploy@example.com} | ||
|
||
# Extended Server Syntax | ||
# ====================== | ||
# This can be used to drop a more detailed server | ||
# definition into the server list. The second argument | ||
# something that quacks like a hash can be used to set | ||
# extended properties on the server. | ||
server 'example.com', user: 'deploy', roles: %w{web app}, my_property: :my_value | ||
|
||
# you can set custom ssh options | ||
# it's possible to pass any option but you need to keep in mind that net/ssh understand limited list of options | ||
# you can see them in [net/ssh documentation](http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start) | ||
# set it globally | ||
# set :ssh_options, { | ||
# keys: %w(/home/rlisowski/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(password) | ||
# } | ||
# and/or per server | ||
# server 'example.com', | ||
# user: 'user_name', | ||
# roles: %w{web app}, | ||
# ssh_options: { | ||
# user: 'user_name', # overrides user setting above | ||
# keys: %w(/home/user_name/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(publickey password) | ||
# # password: 'please use keys' | ||
# } | ||
# setting per server overrides global ssh_options |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Simple Role Syntax | ||
# ================== | ||
# Supports bulk-adding hosts to roles, the primary | ||
# server in each group is considered to be the first | ||
# unless any hosts have the primary property set. | ||
# Don't declare `role :all`, it's a meta role | ||
role :app, %w{deploy@example.com} | ||
role :web, %w{deploy@example.com} | ||
role :db, %w{deploy@example.com} | ||
|
||
# Extended Server Syntax | ||
# ====================== | ||
# This can be used to drop a more detailed server | ||
# definition into the server list. The second argument | ||
# something that quacks like a hash can be used to set | ||
# extended properties on the server. | ||
server 'example.com', user: 'deploy', roles: %w{web app}, my_property: :my_value | ||
|
||
# you can set custom ssh options | ||
# it's possible to pass any option but you need to keep in mind that net/ssh understand limited list of options | ||
# you can see them in [net/ssh documentation](http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start) | ||
# set it globally | ||
# set :ssh_options, { | ||
# keys: %w(/home/rlisowski/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(password) | ||
# } | ||
# and/or per server | ||
# server 'example.com', | ||
# user: 'user_name', | ||
# roles: %w{web app}, | ||
# ssh_options: { | ||
# user: 'user_name', # overrides user setting above | ||
# keys: %w(/home/user_name/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(publickey password) | ||
# # password: 'please use keys' | ||
# } | ||
# setting per server overrides global ssh_options |
1 change: 0 additions & 1 deletion
1
public/assets/.sprockets-manifest-aa47e6a0c2ebd5c6441e7518dbe73490.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.