<commit_before>#!/bin/bash

. /vagrant/resources/colors.sh
. /vagrant/resources/trycatch.sh

try
(
	throwErrors

	echo "Copy API folder"
	rm -fr /var/www/neap/api
	cp -r /vagrant/api/ /var/www/neap/api/

	echo "Setup API"
	/vagrant/bootstrap/setup-api.sh

	echo "Disable development mode"
	php /var/www/neap/api/public/index.php development disable

	echo "Copy static folder"
	rm -fr /var/www/neap/static
	cp -r /vagrant/static/ /var/www/neap/static/

	echo "Copy web folder"
	rm -fr /var/www/neap/web
	cp -r /vagrant/web/ /var/www/neap/web/

	echo "Setup Web"
	/vagrant/bootstrap/setup-web.sh

	echo "Fix Neap folders permissions"
	chown -R www-data:www-data /var/www/neap

	echo "Enable OPcache"<commit_msg>updated prod script to use rsync instead of cp<commit_after>#!/bin/bash

. /vagrant/resources/colors.sh
. /vagrant/resources/trycatch.sh

try
(
	throwErrors

	echo "Copy API folder"
	rm -fr /var/www/neap/api
	rsync -ah --info=progress2 /vagrant/api/ /var/www/neap/api/

	echo "Setup API"
	/vagrant/bootstrap/setup-api.sh

	echo "Disable development mode"
	php /var/www/neap/api/public/index.php development disable

	echo "Copy static folder"
	rm -fr /var/www/neap/static
	rsync -ah --info=progress2 /vagrant/static/ /var/www/neap/static/

	echo "Copy web folder"
	rm -fr /var/www/neap/web
	rsync -ah --info=progress2 /vagrant/web/ /var/www/neap/web/

	echo "Setup Web"
	/vagrant/bootstrap/setup-web.sh

	echo "Fix Neap folders permissions"
	chown -R www-data:www-data /var/www/neap

	echo "Enable OPcache"
{'fraction_non_alphanumeric': 0.1378627968337731, 'fraction_numerical': 0.001978891820580475, 'mean_word_length': 3.1448087431693987, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 20, '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': '5065715', 'n_tokens_mistral': 626, 'n_tokens_neox': 603, 'n_words': 142}