Last active
June 29, 2018 06:48
-
-
Save anoobbava/905c8aa332078d9ee4128e6b312484b1 to your computer and use it in GitHub Desktop.
this is only a skeleton of the deploy.rb and this used for blogging
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
# added all the dependencies | |
#ex: require "this" or "that" etc | |
# preset defaults | |
set :application_name, 'your application name, say like a repo name' | |
set :domain, 'ip address of the server or domain name' | |
set :deploy_to, 'to where the app to be installed' | |
set :repository, 'repo link' | |
set :branch, 'branch may be staging, qa,production etc' | |
set :user, 'to which user is deploying the app' | |
set :rails_env, 'environment to which the app currently in , like staging, qa, production' | |
set :identity_file, "path to the pem file, it is the local path where we put the pem file,pem file supported" | |
set :forward_agent, true | |
set :port, '22' | |
# since the unicorn, need to set the unicorn pid | |
set :unicorn_pid, | |
set :shared_files, ['shared files'] | |
# rails pid | |
set :pid_file, "#{fetch(:deploy_to)}/shared/pids/#{fetch(:rails_env)}.pid" | |
task :setup do | |
# create the folders needed for application execution | |
# command to create the folders and files needed for the deployment | |
end | |
task :deploy => do | |
# clone the app | |
invoke :'git:clone' | |
# Creates symbolic links to paths in shared_paths setting. | |
invoke :'deploy:link_shared_paths' | |
invoke :'bundle:install' | |
invoke :'rails:db_migrate' | |
invoke :'rails:assets_precompile' | |
invoke :'deploy:cleanup' | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment