<commit_before>require 'thinking_sphinx/deploy/capistrano'


default_run_options[:pty] = true  # Must be set for the password prompt from git to work

set :application, "kassi"
set :repository,  "git://github.com/sizzlelab/kassi.git"
set :user, "kassi"  # The server's user for deploys
ssh_options[:forward_agent] = true

set :scm, :git


set :deploy_via, :remote_cache

set :deploy_to, "/var/datat/kassi"

if ENV['DEPLOY_ENV'] == "beta"
  set :server_name, "beta"
  set :host, "beta.sizl.org"
  set :branch, ENV['BRANCH'] || "production"
elsif ENV['DEPLOY_ENV'] == "icsi"
  set :deploy_to, "/opt/kassi"
  set :server_name, "icsi"
  set :host, "sizl.icsi.berkeley.edu"
  set :user, "amvirola"
  set :branch, ENV['BRANCH'] || "production"
elsif ENV['DEPLOY_ENV'] == "delta"
  set :server_name, "alpha"
  set :host, "alpha.sizl.org"
  set :branch, ENV['BRANCH'] || "production"
  set :deploy_to, "/var/datat/deltakassi"
elsif ENV['DEPLOY_ENV'] == "dbtest"
  set :deploy_to, "/var/datat/kassi2dbtest"
  set :server_name, "alpha"
  set :host, "alpha.sizl.org"
  set :branch, ENV['BRANCH'] || "master"
elsif  ENV['DEPLOY_ENV'] == "amazon"
  set :host, "ec2-79-125-82-26.eu-west-1.compute.amazonaws.com"
  set :user, "ubuntu"
  set :server_name, "epsilon"
  set :deploy_to, "/opt/kassi"
  set :branch, ENV['BRANCH'] || "master"
else
  set :server_name, "alpha"
  set :host, "alpha.sizl.org"
  set :branch, ENV['BRANCH'] || "master"
end

set :path, "$PATH:/var/lib/gems/1.8/bin"

role :app, host
role :web, host
role :db, host, :primary => true

set :rails_env, :production
set :use_sudo, false


# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts

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')}"<commit_msg>modifying deploy.rb for production AWS installation<commit_after>require 'thinking_sphinx/deploy/capistrano'


default_run_options[:pty] = true  # Must be set for the password prompt from git to work

set :application, "kassi"
set :repository,  "git://github.com/sizzlelab/kassi.git"
set :user, "kassi"  # The server's user for deploys
ssh_options[:forward_agent] = true

set :scm, :git


set :deploy_via, :remote_cache

set :deploy_to, "/var/datat/kassi"

if ENV['DEPLOY_ENV'] == "beta"
  set :server_name, "beta"
  set :host, "beta.sizl.org"
  set :branch, ENV['BRANCH'] || "production"
elsif ENV['DEPLOY_ENV'] == "icsi"
  set :deploy_to, "/opt/kassi"
  set :server_name, "icsi"
  set :host, "sizl.icsi.berkeley.edu"
  set :user, "amvirola"
  set :branch, ENV['BRANCH'] || "production"
elsif ENV['DEPLOY_ENV'] == "delta"
  set :server_name, "alpha"
  set :host, "alpha.sizl.org"
  set :branch, ENV['BRANCH'] || "production"
  set :deploy_to, "/var/datat/deltakassi"
elsif ENV['DEPLOY_ENV'] == "dbtest"
  set :deploy_to, "/var/datat/kassi2dbtest"
  set :server_name, "alpha"
  set :host, "alpha.sizl.org"
  set :branch, ENV['BRANCH'] || "master"
elsif  ENV['DEPLOY_ENV'] == "amazon"
  set :host, "172.16.31.10"
  set :user, "kassi"
  set :server_name, "aws"
  set :deploy_to, "/opt/kassi"
  set :branch, ENV['BRANCH'] || "master"
else
  set :server_name, "alpha"
  set :host, "alpha.sizl.org"
  set :branch, ENV['BRANCH'] || "master"
end

set :path, "$PATH:/var/lib/gems/1.8/bin"

role :app, host
role :web, host
role :db, host, :primary => true

set :rails_env, :production
set :use_sudo, false


# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts

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')}"
{'fraction_non_alphanumeric': 0.16436290525257602, 'fraction_numerical': 0.006534305101784368, 'mean_word_length': 4.512465373961219, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '757209', 'n_tokens_mistral': 1662, 'n_tokens_neox': 1596, 'n_words': 400}