<commit_before>VOLUME_MAP=//path/to/your/laravel_app:/var/www/html

DB_ROOT_PASS=<PASSWORD>
DB_NAME=db_name
DB_USER=db_user
DB_USER_PASS=<PASSWORD>


all: copy build run sleep migrate seed


build: build-mysql-ds build-app-ds build-apache-php build-artisan

build-mysql-ds:
	docker build -t mysql_datastore mysql_datastore/

build-app-ds:
	docker build -t app_datastore app_datastore/

build-apache-php:
	docker build -t apache_php apache_php/

build-artisan:
	docker build -t artisan artisan/


run: run-mysql-ds run-app-ds run-mysql run-apache-php

run-mysql-ds:
	docker run --name mysql_datastore mysql_datastore true

run-app-ds:
	docker run --name app_datastore -v $(VOLUME_MAP) app_datastore true

run-mysql:
	docker run -p 3306:3306 --name mysql --volumes-from mysql_datastore \
		-e MYSQL_ROOT_PASSWORD=$(<PASSWORD>) \
		-e MYSQL_DATABASE=$(DB_NAME) \
		-e MYSQL_USER=$(DB_USER) \
		-e MYSQL_PASSWORD=$(<PASSWORD>) \
		-d mysql:5.7 \
		--max-allowed-packet=33554432

run-apache-php:
	docker run -p 80:80 --name apache_php --link mysql:mysql \
		--volumes-from app_datastore -d apache_php

<commit_msg>add character set and collation for mysql<commit_after>VOLUME_MAP=//path/to/your/laravel_app:/var/www/html

DB_ROOT_PASS=<PASSWORD>
DB_NAME=db_name
DB_USER=db_user
DB_USER_PASS=<PASSWORD>


all: copy build run sleep migrate seed


build: build-mysql-ds build-app-ds build-apache-php build-artisan

build-mysql-ds:
	docker build -t mysql_datastore mysql_datastore/

build-app-ds:
	docker build -t app_datastore app_datastore/

build-apache-php:
	docker build -t apache_php apache_php/

build-artisan:
	docker build -t artisan artisan/


run: run-mysql-ds run-app-ds run-mysql run-apache-php

run-mysql-ds:
	docker run --name mysql_datastore mysql_datastore true

run-app-ds:
	docker run --name app_datastore -v $(VOLUME_MAP) app_datastore true

run-mysql:
	docker run -p 3306:3306 --name mysql --volumes-from mysql_datastore \
		-e MYSQL_ROOT_PASSWORD=$(<PASSWORD>) \
		-e MYSQL_DATABASE=$(DB_NAME) \
		-e MYSQL_USER=$(DB_USER) \
		-e MYSQL_PASSWORD=$(<PASSWORD>) \
		-d mysql:5.7 \
		--max-allowed-packet=33554432 \
		--character-set-server=utf8 \
		--collation-server=utf8_general_ci

run-apache-php:
	docker run -p 80:80 --name apache_php --link mysql:mysql \
		--volumes-from app_datastore -d apache_php


{'fraction_non_alphanumeric': 0.119551143720328, 'fraction_numerical': 0.01985325852395339, 'mean_word_length': 3.9742489270386265, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2778023', 'n_tokens_mistral': 981, 'n_tokens_neox': 913, 'n_words': 198}