<commit_before>#!/usr/bin/env bash
# enable fail detection...
set -e
source /initialize.sh

initialize

echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
HOSTIP=$(vagrant ssh-config | awk '/HostName/ {print $2}')

echo -e "\nSETTING up Dokku SSH key.\n"
cat /.ssh/id_rsa.pub | vagrant ssh -c "docker exec -i dokku sshcommand acl-add dokku root"

echo -e "\nCLONING repo\n"
git clone https://github.com/heroku/node-js-sample.git
cd node-js-sample/
git config user.email "<EMAIL>"
git config user.name "Protonet Integration Test node.js"
# http://progrium.viewdocs.io/dokku/checks-examples.md
echo -e "WAIT=10\nATTEMPTS=20\n/ Hello" > CHECKS
git add .
git commit -a -m "Initial Commit"
echo -e "\nRUNNING git push to ${HOSTIP}\n"
git remote add dokku ssh://dokku@${HOSTIP}:8022/node-js-app
# destroy in case it's already deployed
ssh -t -p 8022 dokku@${HOSTIP} apps:destroy node-js-app force || true
# ssh -t -p 8022 dokku@${HOSTIP} trace on
git push dokku master

wget -O - http://${HOSTIP}/node-js-app<commit_msg>Use our own nodejs 'hello world' source<commit_after>#!/usr/bin/env bash
# enable fail detection...
set -e
source /initialize.sh

initialize

echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
HOSTIP=$(vagrant ssh-config | awk '/HostName/ {print $2}')

echo -e "\nSETTING up Dokku SSH key.\n"
cat /.ssh/id_rsa.pub | vagrant ssh -c "docker exec -i dokku sshcommand acl-add dokku root"

echo -e "\nCLONING repo\n"
git clone https://github.com/experimental-platform/nodejs-hello-world.git
cd nodejs-hello-world/
git config user.email "<EMAIL>"
git config user.name "Protonet Integration Test node.js"
# http://progrium.viewdocs.io/dokku/checks-examples.md
echo -e "WAIT=10\nATTEMPTS=20\n/ Hello" > CHECKS
git add .
git commit -a -m "Initial Commit"
echo -e "\nRUNNING git push to ${HOSTIP}\n"
git remote add dokku ssh://dokku@${HOSTIP}:8022/node-js-app
# destroy in case it's already deployed
ssh -t -p 8022 dokku@${HOSTIP} apps:destroy node-js-app force || true
# ssh -t -p 8022 dokku@${HOSTIP} trace on
git push dokku master

wget -O - http://${HOSTIP}/node-js-app
{'fraction_non_alphanumeric': 0.14628297362110312, 'fraction_numerical': 0.01630695443645084, 'mean_word_length': 3.896713615023474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '3654052', 'n_tokens_mistral': 818, 'n_tokens_neox': 776, 'n_words': 235}