<commit_before>cookbook_file '/home/docd/docd/shared/config/unicorn.rb' do
  source 'unicorn.rb'
  user 'docd'; group 'docd'; mode '644'
end

directory '/var/log/unicorn' do
  user 'root'; group 'root'; mode '755'
  recursive true
end

# runit
directory '/etc/service/docd_unicorn/log' do
  user 'root'; group 'root'; mode '755'
  recursive true
end

file '/etc/service/docd_unicorn/log/run' do
  content <<EOM
#!/bin/bash
set -ex
exec svlogd -tt /var/log/unicorn
EOM
  user 'root'; group 'root'; mode '755'
end

file '/etc/service/docd_unicorn/run' do
  content <<EOM
#!/bin/bash
set -ex
exec chpst -u docd:docd -/home/docd/docd/current unicorn -c config/unicorn.rb
EOM
  user 'root'; group 'root'; mode '755'<commit_msg>Update chroot argument for chpst unicorn runit service<commit_after>cookbook_file '/home/docd/docd/shared/config/unicorn.rb' do
  source 'unicorn.rb'
  user 'docd'; group 'docd'; mode '644'
end

directory '/var/log/unicorn' do
  user 'root'; group 'root'; mode '755'
  recursive true
end

# runit
directory '/etc/service/docd_unicorn/log' do
  user 'root'; group 'root'; mode '755'
  recursive true
end

file '/etc/service/docd_unicorn/log/run' do
  content <<EOM
#!/bin/bash
set -ex
exec svlogd -tt /var/log/unicorn
EOM
  user 'root'; group 'root'; mode '755'
end

file '/etc/service/docd_unicorn/run' do
  content <<EOM
#!/bin/bash
set -ex
exec chpst -u docd:docd -/ /home/docd/docd/current unicorn -c config/unicorn.rb
EOM
  user 'root'; group 'root'; mode '755'
{'fraction_non_alphanumeric': 0.14593140551445863, 'fraction_numerical': 0.020174848688634835, 'mean_word_length': 3.8947368421052633, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1058908', 'n_tokens_mistral': 613, 'n_tokens_neox': 581, 'n_words': 166}