Skip to content

Commit

Permalink
add deployment scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Aug 16, 2024
1 parent f932e9f commit e45ad84
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Load DSL and set up stages
require "capistrano/setup"

# Include default deployment tasks
require "capistrano/deploy"

# Load the SCM plugin appropriate to your project:
#
# require "capistrano/scm/hg"
# install_plugin Capistrano::SCM::Hg
# or
# require "capistrano/scm/svn"
# install_plugin Capistrano::SCM::Svn
# or
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git

# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
# https://github.com/capistrano/rvm
# https://github.com/capistrano/rbenv
# https://github.com/capistrano/chruby
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
# https://github.com/capistrano/passenger
#
# require "capistrano/rvm"
# require "capistrano/rbenv"
# require "capistrano/chruby"
# require "capistrano/bundler"
# require "capistrano/rails/assets"
# require "capistrano/rails/migrations"
# require "capistrano/passenger"

# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
7 changes: 7 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,15 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
activesupport (~> 3.2)
bcrypt_pbkdf (>= 1.0, < 2.0)
binding_of_caller (~> 1.0)
capistrano (~> 3)
capistrano-bundler
capistrano-locally
capistrano-rbenv
cube-ruby
ed25519 (>= 1.2, < 2.0)
email_spec
ffi
goo!
Expand Down
27 changes: 27 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
set :repo_url, "[email protected]:biodivportal/ncbo_cron.git"
set :user, 'ontoportal'

set :deploy_to, '/srv/ontoportal/ncbo_cron_deployments'


set :stages, %w[appliance]
set :default_stage, 'appliance'
set :stage, 'appliance'
set :application, 'cron'

# SSH parameters
set :ssh_port, 22
set :pty, true

# Source code
set :repository_cache, "git_cache"
set :deploy_via, :remote_cache
set :ssh_options, { :forward_agent => true }

# Linked files and directories
append :linked_files, "config/config.rb"
append :linked_dirs, 'logs', '.bundle'
append :linked_files, "config/site_config.rb"
set :keep_releases, 2


13 changes: 13 additions & 0 deletions config/deploy/production.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set :branch, 'master'
set :server, 'biodivportal.gfbio.org'

server fetch(:server), user: fetch(:user), roles: %w{web app}

set :ssh_options, {
user: 'ontoportal',
forward_agent: 'true',
#keys: %w(config/deploy_id_rsa),
#auth_methods: %w(publickey),
# use ssh proxy if UI servers are on a private network
#proxy: Net::SSH::Proxy::Command.new('ssh [email protected] -W %h:%p')
}
13 changes: 13 additions & 0 deletions config/deploy/test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set :branch, 'master'
set :server, 'biodivportal.gfbio.dev'

server fetch(:server), user: fetch(:user), roles: %w{web app}

set :ssh_options, {
user: 'ontoportal',
forward_agent: 'true',
#keys: %w(config/deploy_id_rsa),
#auth_methods: %w(publickey),
# use ssh proxy if UI servers are on a private network
#proxy: Net::SSH::Proxy::Command.new('ssh [email protected] -W %h:%p')
}

0 comments on commit e45ad84

Please sign in to comment.