Sha256: 1a349120ea2d75b5072df33ff4cc5a37a2f35e2ba37ea65e811a53c8bbe37dda
Contents?: true
Size: 1.63 KB
Versions: 6
Compression:
Stored size: 1.63 KB
Contents
require 'bundler/capistrano' set :rvm_ruby_string, '2.3.1' require "rvm/capistrano" require 'capistrano-db-tasks' load "config/recipes/base" load "config/recipes/unicorn" load "config/recipes/delayed_job" default_run_options[:pty] = false set :application, '<%= @application_name %>' set :repository, 'ssh://git@bitbucket.org/tmatttechnologyptyltd/.git' set :scm, :git set :deploy_to, '/home/deploy/<%= @application_name %>' set :user, 'deploy' set :branch, 'master' set :rails_env, 'production' set :migrate_env, 'production' set :use_sudo, false set :deploy_via, :remote_cache set :db_local_clean, true set :locals_rails_env, 'development' project_name = '<%= @application_name %>' server_address = 'server_address' server_ip = 'server_ip' puts 'Enter rake command[db:migrate]: ' db_cmd = STDIN.gets.chomp db_cmd = 'db:migrate' if db_cmd == '' set :server_address, server_address server server_ip, :app, :web, :db, :primary => true after 'deploy:restart', 'deploy:cleanup' after 'deploy:restart', 'unicorn:restart' after 'deploy:restart', 'sidekiq:restart' after 'deploy', 'assets:precompile' after 'bundle:install', :roles => :web do run "ln -s #{shared_path}/config/application.yml #{release_path}/config/application.yml" run "ln -s #{shared_path}/config/database.yml #{release_path}/config/database.yml" run "ln -s #{shared_path}/config/secrets.yml #{release_path}/config/secrets.yml" end namespace :deploy do task :start do ; end task :stop do ; end task :restart, :roles => :app, :except => { :no_release => true } do run "cd '/home/deploy/#{project_name}/current' ; bundle exec rake #{db_cmd} RAILS_ENV=production" end end
Version data entries
6 entries across 6 versions & 1 rubygems