<commit_before>set :application, 'carbon-diet'

set :scm, "git"
set :repository, '<EMAIL>:Floppy/carbon-diet.git'
set :deploy_via, :export

set :deploy_to, '/home/carbondiet'
set :user, 'carbondiet'

role :app, '172.16.58.3'
role :web, '172.16.58.3'
role :db,  '172.16.58.3', :primary => true

after "deploy:update_code", "symlink:avatars", "symlink:dbconfig"

namespace :deploy do
  desc "Restarting mod_rails with restart.txt"
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "touch #{current_path}/tmp/restart.txt"
  end
  [:start, :stop].each do |t|
    desc "#{t} task is a no-op with mod_rails"
    task t, :roles => :app do ; end
  end
end

namespace :symlink do
  desc "Symlink the avatars folder."
  task :avatars do
    run "ln -fs #{shared_path}/avatars #{release_path}/public/images"
  end
  desc "Make copy of database yaml" <commit_msg>automatically clean up old releases after successful deploy. Also triggers hoptoad deploy tracking.<commit_after>set :application, 'carbon-diet'

set :scm, "git"
set :repository, '<EMAIL>.com:Floppy/carbon-diet.git'
set :deploy_via, :export

set :deploy_to, '/home/carbondiet'
set :user, 'carbondiet'

role :app, '172.16.58.3'
role :web, '172.16.58.3'
role :db,  '172.16.58.3', :primary => true

after "deploy:update_code", "symlink:avatars", "symlink:dbconfig"

after "deploy", "deploy:cleanup"

namespace :deploy do
  desc "Restarting mod_rails with restart.txt"
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "touch #{current_path}/tmp/restart.txt"
  end
  [:start, :stop].each do |t|
    desc "#{t} task is a no-op with mod_rails"
    task t, :roles => :app do ; end
  end
end

namespace :symlink do
  desc "Symlink the avatars folder."
  task :avatars do
    run "ln -fs #{shared_path}/avatars #{release_path}/public/images"
  end
  desc "Make copy of database yaml" 
{'fraction_non_alphanumeric': 0.15021231422505307, 'fraction_numerical': 0.025477707006369428, 'mean_word_length': 4.207182320441989, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '299384', 'n_tokens_mistral': 754, 'n_tokens_neox': 696, 'n_words': 207}