<commit_before>#!/bin/bash

container_name="image-cache"
container_tag="strider2038/image-cache"

echo "Preparing container for acceptance testing..."
echo "========================================================================="

echo "Preparing folders..."
mkdir -p ./runtime/tests/acceptance/web
mkdir -p ./runtime/tests/acceptance/storage
chmod 0777 ./runtime/tests/acceptance/web
chmod 0777 ./runtime/tests/acceptance/storage

echo "Starting container..."
docker run \
    --publish 127.0.0.1:1234:80 \
    --detach \
    --name "$container_name" \
    --stop-signal SIGKILL \
    --env APP_CONFIGURATION_FILENAME=config/testing/acceptance-parameters.yml \
    --volume $PWD/runtime/tests/acceptance/web:/app/web \
    --volume $PWD/runtime/tests/acceptance/storage:/tmp/storage \
    "$container_tag"

docker ps
docker logs "$container_name"

curl -v localhost:1234
curl -v 0.0.0.0:1234
nc -zv localhost 1234
nc -zv 0.0.0.0 1234<commit_msg>Acceptance test in CI debugging<commit_after>#!/bin/bash

container_name="image-cache"
container_tag="strider2038/image-cache"

echo "Preparing container for acceptance testing..."
echo "========================================================================="

echo "Starting container..."
docker run \
    --publish 127.0.0.1:1234:80 \
    --detach \
    --name "$container_name" \
    --stop-signal SIGKILL \
    --env APP_CONFIGURATION_FILENAME=config/testing/acceptance-parameters.yml \
    "$container_tag"

docker ps
docker logs "$container_name"
docker exec -it "$container_name" sh -c "supervisorctl status"
sleep 5

curl -v localhost:1234
curl -v 0.0.0.0:1234
nc -zv localhost 1234
nc -zv 0.0.0.0 1234
{'fraction_non_alphanumeric': 0.21325301204819277, 'fraction_numerical': 0.053614457831325305, 'mean_word_length': 3.9142011834319526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '1653778', 'n_tokens_mistral': 614, 'n_tokens_neox': 519, 'n_words': 120}