<commit_before>#!/bin/sh

REPO=batandwa/just-the-video
BUILD_IMAGE=just-the-video-build
TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
TAG="${TAG/feature\//}"
DEST_DIR=~/projects/just_the_video

docker run --rm -it -v `pwd`:/code batandwa/$BUILD_IMAGE:latest sh -c "cd /code && ls -alh && npm install && grunt --gruntfile=gruntfile.js setup build"
docker build -f Dockerfile -t $REPO:$TAG .
docker login --username $DOCKER_REGISTRY_USER --password "$DOCKER_REGISTRY_PASSWORD"
docker run -d -p 80:80 $REPO:$TAG
sleep 5
curl localhost:80 --head

docker push $REPO:$TAG

openssl aes-256-cbc -K $encrypted_75ea7b9aaeb2_key -iv $encrypted_75ea7b9aaeb2_iv -in id_rsa.enc -out /tmp/id_rsa -d
chmod 0600 /tmp/id_rsa
ssh -o StrictHostKeyChecking=no -i /tmp/id_rsa $APP_HOST $DEST_DIR
scp -i /tmp/id_rsa docker-compose.yml $APP_HOST:$DEST_DIR<commit_msg>Fixed some path and authentication issues.<commit_after>#!/bin/sh

REPO=batandwa/just-the-video
BUILD_IMAGE=just-the-video-build
TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
TAG="${TAG/feature\//}"
DEST_DIR=/home/$APP_HOST_USER/projects/just_the_video

docker run --rm -it -v `pwd`:/code batandwa/$BUILD_IMAGE:latest sh -c "cd /code && ls -alh && npm install && grunt --gruntfile=gruntfile.js setup build"
docker build -f Dockerfile -t $REPO:$TAG .
docker login --username $DOCKER_REGISTRY_USER --password "$DOCKER_REGISTRY_PASSWORD"
docker run -d -p 80:80 $REPO:$TAG
sleep 5
curl localhost:80 --head

docker push $REPO:$TAG

openssl aes-256-cbc -K $encrypted_75ea7b9aaeb2_key -iv $encrypted_75ea7b9aaeb2_iv -in id_rsa.enc -out /tmp/id_rsa -d
chmod 0600 /tmp/id_rsa
ssh -o StrictHostKeyChecking=no -i /tmp/id_rsa $APP_HOST_USER@$APP_HOST mkdir -p $DEST_DIR
scp -o StrictHostKeyChecking=no -i /tmp/id_rsa docker-compose.yml $APP_HOST:$DEST_DIR
ssh -o StrictHostKeyChecking=no -i /tmp/id_rsa $APP_HOST cd $DEST_DIR && docker-compose up -d
{'fraction_non_alphanumeric': 0.1393110435663627, 'fraction_numerical': 0.0243161094224924, 'mean_word_length': 4.75801749271137, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4052758', 'n_tokens_mistral': 873, 'n_tokens_neox': 798, 'n_words': 191}