<commit_before><%
  database_host = nil
  if_p('nfsbroker.db_hostname') do |host|
    database_host = host
  end.else do
    database_host = link('database').instances[0].address
  end
%>
{
  "username":"<%= p('nfsbroker.db_username') %>",
  "password":"<%= p('<PASSWORD>') %>",
  "host":"<%= database_host %>",
  "port":<%= p('nfsbroker.db_port') %>,
  "database":"<%= p('nfsbroker.db_name') %>",
  "adapter":"<%= p('nfsbroker.db_driver') %>"
}<commit_msg>Add db_ca_cert to nfsbroker-bbr config.json<commit_after><%=
  database_host = nil
  if_p('nfsbroker.db_hostname') do |host|
    database_host = host
  end.else do
    database_host = link('database').instances[0].address
  end

  config = {
    username: p('nfsbroker.db_username'),
    password: p('<PASSWORD>'),
    host: database_host,
    port: p('nfsbroker.db_port'),
    database: p('nfsbroker.db_name'),
    adapter: p('nfsbroker.db_driver')
  }

  if_p('nfsbroker.db_ca_cert') do |ca_cert|
    config[:tls] = {}
    config[:tls][:cert] = {}
    config[:tls][:cert][:ca] = ca_cert
  end

  config.to_json
%>
{'fraction_non_alphanumeric': 0.2042910447761194, 'fraction_numerical': 0.0018656716417910447, 'mean_word_length': 4.365, 'pattern_counts': {'":': 6, '<': 13, '<?xml version=': 0, '>': 13, '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': '2002072', 'n_tokens_mistral': 432, 'n_tokens_neox': 422, 'n_words': 64}