<commit_before>#!/bin/bash

APP_NAME=inertialbox

#docker ps -a | grep mysql-data > /dev/null 2>&1
#if [ $? -ne 0 ]; then
  #docker run --name mysql-data -v /var/lib/mysql inertialbox/trusty-base /bin/true
#fi

docker ps -a | grep "mysql[^\-]" > /dev/null 2>&1
if [ $? -ne 0 ]; then
  docker run -d -v /tmp:/tmp -v /etc/mysql:/etc/mysql -v /var/lib/mysql:/var/lib/mysql --name mysql -p 3306:3306 -e "MYSQL_ROOT_PASSWORD=<PASSWORD>" -e "MYSQL_USER=${APP_NAME}" -e "MYSQL_PASSWORD=<PASSWORD>" -e "MYSQL_DATABASE=${APP_NAME}_production" mysql:5.7
fi

[ -n "$REBUILD" ] && docker build -t inertialbox/inertialbox-app ~/hack/inertialbox.com

docker ps -a | grep "[^-]app\b" > /dev/null 2>&1
if [ $? -eq 0 ]; then
  docker stop app && docker rm app
fi
docker run -d --name app -v /var/log/nginx/:/var/log/nginx/ -v /var/lib/mysql:/var/lib/mysql -v /tmp:/tmp -p 80:80 -e "SECRET_KEY_BASE=secretkey" --link mysql:webdb inertialbox/inertialbox-app<commit_msg>Using host volumes instead of data containers<commit_after>#!/bin/bash

APP_NAME=inertialbox

docker ps -a | grep "mysql[^\-]" > /dev/null 2>&1
if [ $? -ne 0 ]; then
  docker run -d -v /tmp:/tmp -v /etc/mysql:/etc/mysql -v /var/lib/mysql:/var/lib/mysql --name mysql -p 3306:3306 -e "MYSQL_ROOT_PASSWORD=<PASSWORD>30W43I" -e "MYSQL_USER=${APP_NAME}" -e "MYSQL_PASSWORD=<PASSWORD>" -e "MYSQL_DATABASE=${APP_NAME}_production" mysql:5.7
fi

[ -n "$REBUILD" ] && docker build -t inertialbox/inertialbox-app ~/hack/inertialbox.com

docker ps -a | grep "[^-]app\b" > /dev/null 2>&1
if [ $? -eq 0 ]; then
  docker stop app && docker rm app
fi
docker run -d --name app -v /var/log/nginx/:/var/log/nginx/ -v /var/lib/mysql:/var/lib/mysql -v /tmp:/tmp -p 80:80 -e "SECRET_KEY_BASE=secretkey" --link mysql:webdb inertialbox/inertialbox-app
{'fraction_non_alphanumeric': 0.18739448508722567, 'fraction_numerical': 0.026449071468767585, 'mean_word_length': 3.4785894206549117, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '633068', 'n_tokens_mistral': 797, 'n_tokens_neox': 730, 'n_words': 183}