<commit_before>#!/bin/bash

mkdir -p /data/entu/code /data/entu/ssl /data/entu/files /data/entu/thumbs
cd /data/entu/code

git clone https://github.com/argoroots/Entu.git ./
git checkout master
git pull

version=`date +"%y%m%d.%H%M%S"`

docker build -q -t entu:$version ./ && docker tag -f entu:$version entu:latest
docker stop entu
docker rm entu
docker run -d \
    --name="entu" \
    --restart="always" \
    --memory="512m" \
    --env="PORT=80" \
    --env="MYSQL_HOST=" \
    --env="MYSQL_DATABASE=" \
    --env="MYSQL_USER=" \
    --env="MYSQL_PASSWORD=" \
    --env="CUSTOMERGROUP=" \
    --env="NEW_RELIC_APP_NAME=entu" \
    --env="NEW_RELIC_LICENSE_KEY=" \
    --env="NEW_RELIC_LOG=stdout" \
    --env="NEW_RELIC_LOG_LEVEL=error" \
    --env="NEW_RELIC_NO_CONFIG_FILE=true" \
    --env="SENTRY_DSN=" \
    entu:latest python /usr/src/entu/app/main.py --logging=error

/data/nginx.sh

docker stop entu-maintenance
docker rm entu-maintenance
docker run -d \
    --name="entu-maintenance" \
    --restart="always" \
    --memory="512m" \
    --env="MYSQL_HOST=" \
    --env="MYSQL_DATABASE=" \
    --env="MYSQL_USER=" \
    --env="MYSQL_PASSWORD=" \
    --env="NEW_RELIC_APP_NAME=entu-maintenance" \
    --env="NEW_RELIC_LICENSE_KEY=" \
    --env="NEW_RELIC_LOG=stdout" \
    --env="NEW_RELIC_LOG_LEVEL=error" \
    --env="NEW_RELIC_NO_CONFIG_FILE=true" \
    --env="CUSTOMERGROUP=" \
    entu:latest /usr/src/entu/app/maintenance.py<commit_msg>entu.sh update<commit_after>#!/bin/bash

# /data/entu-mysql.sh

mkdir -p /data/entu/code /data/entu/ssl /data/entu/files /data/entu/thumbs
cd /data/entu/code

git clone -q https://github.com/argoroots/Entu.git ./
git checkout -q master
git pull
printf "\n\n"

version=`date +"%y%m%d.%H%M%S"`
docker build -q -t entu:$version ./ && docker tag -f entu:$version entu:latest
printf "\n\n"

docker stop entu-maintenance
docker rm entu-maintenance
docker run -d \
    --name="entu-maintenance" \
    --restart="always" \
    --memory="512m" \
    --env="MYSQL_HOST=" \
    --env="MYSQL_DATABASE=" \
    --env="MYSQL_USER=" \
    --env="MYSQL_PASSWORD=" \
    --env="CUSTOMERGROUP=" \
    --env="VERBOSE=0" \
    --env="NEW_RELIC_APP_NAME=entu-maintenance" \
    --env="NEW_RELIC_LICENSE_KEY=" \
    --env="NEW_RELIC_LOG=stdout" \
    --env="NEW_RELIC_LOG_LEVEL=error" \
    --env="NEW_RELIC_NO_CONFIG_FILE=true" \
    --link="entu-mysql:entumysql" \
    entu:latest python /usr/src/entu/app/maintenance.py

docker inspect -f "{{ .NetworkSettings.IPAddress }}" entu-maintenance
printf "\n\n"

docker stop entu
docker rm entu
docker run -d \
    --name="entu" \
    --restart="always" \
    --memory="512m" \
    --env="PORT=80" \
    --env="DEBUG=false" \
    --env="MYSQL_HOST=" \
    --env="MYSQL_DATABASE=" \
    --env="MYSQL_USER=" \
    --env="MYSQL_PASSWORD=" \
    --env="CUSTOMERGROUP=" \
    --env="NEW_RELIC_APP_NAME=entu" \
    --env="NEW_RELIC_LICENSE_KEY=" \
    --env="NEW_RELIC_LOG=stdout" \
    --env="NEW_RELIC_LOG_LEVEL=error" \
    --env="NEW_RELIC_NO_CONFIG_FILE=true" \
    --env="SENTRY_DSN=" \
    --link="entu-mysql:entumysql" \
    --volume="/data/entu/files:/entu/files" \
    --volume="/data/entu/thumbs:/entu/thumbs" \
    entu:latest python /usr/src/entu/app/main.py --logging=error

docker inspect -f "{{ .NetworkSettings.IPAddress }}" entu
printf "\n\n"

/data/nginx.sh
{'fraction_non_alphanumeric': 0.19330743949805795, 'fraction_numerical': 0.005079175380938153, 'mean_word_length': 2.795918367346939, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3117244', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1374, 'n_words': 192}