<commit_before>require "bundler/capistrano"
load 'deploy/assets'

set :application, 'nhs-patientlist'
set :scm,         :git
set :repository,  "<EMAIL>:edgecase/nhs-patientlist.git"
set :rails_env,   :production
set :use_sudo,    false
set :user,        "hack_day_user"
set :deploy_to,   "/u/apps/#{application}"
set :deploy_server, "172.16.31.10"

ssh_options[:forward_agent] = true
default_run_options[:pty] = true

# deployment servers
role :web, deploy_server                    # Web server (Nginx)
role :app, deploy_server                    # App server (unicorn)
role :db,  deploy_server, :primary => true  # db server  (postgres)

before "deploy:assets:precompile", "symlink_config_files"

task :symlink_config_files, :roles => :app do
  run "cd #{release_path}/config && rm -f database.yml && ln -s #{shared_path}/config/database.yml"
end<commit_msg>restart passenger after deploy: :<commit_after>require "bundler/capistrano"
load 'deploy/assets'

set :application, 'nhs-patientlist'
set :scm,         :git
set :repository,  "git<EMAIL>.com:edgecase/nhs-patientlist.git"
set :rails_env,   :production
set :use_sudo,    false
set :user,        "hack_day_user"
set :deploy_to,   "/u/apps/#{application}"
set :deploy_server, "172.16.31.10"

ssh_options[:forward_agent] = true
default_run_options[:pty] = true

# deployment servers
role :web, deploy_server                    # Web server (Nginx)
role :app, deploy_server                    # App server (unicorn)
role :db,  deploy_server, :primary => true  # db server  (postgres)

before "deploy:assets:precompile", "symlink_config_files"
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')}"
  end
end

task :symlink_config_files, :roles => :app do
  run "cd #{release_path}/config && rm -f database.yml && ln -s #{shared_path}/config/database.yml"
end
{'fraction_non_alphanumeric': 0.13560182833925852, 'fraction_numerical': 0.009141696292534281, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2046376', 'n_tokens_mistral': 702, 'n_tokens_neox': 667, 'n_words': 172}