<commit_before>#!/bin/bash

# use the rabbitmq linked in docker
if [ "x$TRANSPORT_URL" = "x" ]; then
    if [ "x$RABBITMQ_PORT_5672_TCP_PORT" != "x" ]; then
        TRANSPORT_URL="amqp://guest:guest@rabbitmq:${RABBITMQ_PORT_5672_TCP_PORT}/"
    else
        TRANSPORT_URL='amqp://guest:guest@localhost:5672/'
    fi
fi

if [ "x$ENDPOINT_URL" = "x" ]; then
    if [ x"$API_PORT" != "x" ]; then
        ENDPOINT_URL="http://api:${API_PORT_80_TCP_PORT}"
    else
        ENDPOINT_URL='http://127.0.0.1'
    fi
fi


sed -i -e "s#transport_url = .*#transport_url = $TRANSPORT_URL#" /etc/faafo/faafo.conf
sed -i -e "s#database_url = .*#database_url = $DATABASE_URL#" /etc/faafo/faafo.conf
sed -i -e "s#endpoint_url = .*#endpoint_url = $ENDPOINT_URL#" /etc/faafo/faafo.conf

exec "$@"<commit_msg>Add missing database url<commit_after>#!/bin/bash

# use the rabbitmq linked in docker
if [ "x$TRANSPORT_URL" = "x" ]; then
    if [ "x$RABBITMQ_PORT_5672_TCP_PORT" != "x" ]; then
        TRANSPORT_URL="amqp://guest:guest@rabbitmq:${RABBITMQ_PORT_5672_TCP_PORT}/"
    else
        TRANSPORT_URL='amqp://guest:guest@localhost:5672/'
    fi
fi

if [ "x$ENDPOINT_URL" = "x" ]; then
    if [ x"$API_PORT" != "x" ]; then
        ENDPOINT_URL="http://api:${API_PORT_80_TCP_PORT}"
    else
        ENDPOINT_URL='http://127.0.0.1'
    fi
fi

DATABASE_URL="sqlite:////tmp/sqlite.db"


sed -i -e "s#transport_url = .*#transport_url = $TRANSPORT_URL#" /etc/faafo/faafo.conf
sed -i -e "s#database_url = .*#database_url = $DATABASE_URL#" /etc/faafo/faafo.conf
sed -i -e "s#endpoint_url = .*#endpoint_url = $ENDPOINT_URL#" /etc/faafo/faafo.conf

exec "$@"
{'fraction_non_alphanumeric': 0.17791411042944785, 'fraction_numerical': 0.024539877300613498, 'mean_word_length': 3.6073446327683616, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2325393', 'n_tokens_mistral': 745, 'n_tokens_neox': 704, 'n_words': 114}