<commit_before>#!/usr/bin/env bash

set -e
set -u

PYTHON=$(which python3 || which python)

METADATA_HOST=169.254.169.254
METADATA_PORT=80
METADATA_URL=http://${METADATA_HOST}:${METADATA_PORT}/latest/meta-data/local-ipv4

export DOCKER_IP=$(hostname --ip-address)

#Check connectivity
curl -s -m1 ${METADATA_URL} || exitcode=$?
if [ -n "${exitcode+set}" ]; then
  export DOCKER_EXTERNAL_IP=${DOCKER_IP}
else
  export DOCKER_EXTERNAL_IP=$(curl ${METADATA_URL})
fi

if [ "${CONSUL_HOST:-notset}" == 'notset' ]; then
    export CONSUL_HOST=${DOCKER_EXTERNAL_IP}
fi

echo Starting server
uwsgi
<commit_msg>move the uwsgi - config to Openstack<commit_after>#!/usr/bin/env bash

set -e
set -u

PYTHON=$(which python3 || which python)

METADATA_HOST=169.254.169.254
METADATA_PORT=80
METADATA_URL=http://${METADATA_HOST}:${METADATA_PORT}/latest/meta-data/local-ipv4

export DOCKER_IP=$(hostname --ip-address)

#Check connectivity
curl -s -m1 ${METADATA_URL} || exitcode=$?
if [ -n "${exitcode+set}" ]; then
  export DOCKER_EXTERNAL_IP=${DOCKER_IP}
else
  export DOCKER_EXTERNAL_IP=$(curl ${METADATA_URL})
fi

if [ "${CONSUL_HOST:-notset}" == 'notset' ]; then
    export CONSUL_HOST=${DOCKER_EXTERNAL_IP}
fi

echo Starting server
# run uwsgi
exec uwsgi

{'fraction_non_alphanumeric': 0.1527331189710611, 'fraction_numerical': 0.027331189710610933, 'mean_word_length': 5.552631578947368, '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': '801878', 'n_tokens_mistral': 537, 'n_tokens_neox': 504, 'n_words': 98}