<commit_before>#!/bin/bash

# Absolutely moves to directory where this script is located
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd ${BASEDIR}

# Setup the default .env file if it does not already exist
if [ ! -f ./.env ]; then
    echo "Creating .env file..."
    cp ./.env-defaults ./.env
fi

# Start up the Docker containers
docker-compose -p ifs up -d

# Make sure that the Docker environment have been setup properly
wait
sleep 5

docker-compose -p ifs exec mysql bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e "CREATE DATABASE IF NOT EXISTS ifs_test"'
docker-compose -p ifs exec mysql bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e "CREATE DATABASE IF NOT EXISTS ifs"'

cd ../../../
./gradlew -Pprofile=docker flywayClean flywayMigrate
cd ${BASEDIR}
./scripts/_delete-shib-users-remote.sh
./syncShib.sh
./deploy.sh all<commit_msg>INFUND-5930 - Adds additional wait for setup.sh incase databases have not been created<commit_after>#!/bin/bash

# Absolutely moves to directory where this script is located
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd ${BASEDIR}

# Setup the default .env file if it does not already exist
if [ ! -f ./.env ]; then
    echo "Creating .env file..."
    cp ./.env-defaults ./.env
fi

# Start up the Docker containers
docker-compose -p ifs up -d

# Make sure that the Docker environment have been setup properly
wait
sleep 3

docker-compose -p ifs exec mysql bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e "CREATE DATABASE IF NOT EXISTS ifs_test"'
docker-compose -p ifs exec mysql bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e "CREATE DATABASE IF NOT EXISTS ifs"'

wait
sleep 3

cd ../../../
./gradlew -Pprofile=docker flywayClean flywayMigrate
cd ${BASEDIR}
./scripts/_delete-shib-users-remote.sh
./syncShib.sh
./deploy.sh all
{'fraction_non_alphanumeric': 0.1281198003327787, 'fraction_numerical': 0.004991680532445923, 'mean_word_length': 3.5786802030456855, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5889141', 'n_tokens_mistral': 648, 'n_tokens_neox': 607, 'n_words': 227}