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

while test $# -gt 0; do
    case "$1" in
        --dev)
            APP_ENV="development"
            shift
            ;;
    esac
done

APP_ENV="${APP_ENV:-production}"

docker-compose down
docker-compose rm -f
docker-compose pull

if [ $APP_ENV = "production" ]; then
    docker-compose run --rm cli azuracast_update
else
    docker-compose run --rm cli azuracast_update --dev
fi

docker-compose up -d

docker rmi $(docker images | grep "none" | awk '/ / { print $3 }')<commit_msg>Add docker-compose update prompt to docker-update.sh<commit_after>#!/usr/bin/env bash

docker-compose down
docker-compose rm -f

read -p "Update docker-compose.yml file? This will overwrite any customizations you made to this file. [y/N] " -n 1 -r
echo

if [[ $REPLY =~ ^[Yy]$ ]]; then

    cp docker-compose.yml docker-compose.backup.yml
    echo "Your existing docker-compose.yml file has been backed up to docker-compose.backup.yml."

    curl -L https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/docker-compose.sample.yml > docker-compose.yml
    echo "New docker-compose.yml file loaded."

fi

docker-compose pull
docker-compose run --rm cli azuracast_update
docker-compose up -d

docker rmi $(docker images | grep "none" | awk '/ / { print $3 }')
{'fraction_non_alphanumeric': 0.12314886983632112, 'fraction_numerical': 0.003897116134060795, 'mean_word_length': 3.050473186119874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 1, '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': '1950368', 'n_tokens_mistral': 481, 'n_tokens_neox': 434, 'n_words': 131}