<commit_before>#! /bin/bash
PROJECT_ID=jwnwilson-eu
SERVER_IP="172.16.17.32"
TODAY=$(date +"%m_%d_%Y")


# Copy project to server
zip -r /tmp/project.zip . -x ./server/venv/**\* ./server/.cov/**\* ./client/node_modules/**\*
scp /tmp/project.zip root@${SERVER_IP}:/tmp/project.zip
ssh root@${SERVER_IP} "unzip /tmp/project.zip -d /opt/app/noelwilson_${TODAY}"
ssh root@${SERVER_IP} "rm /opt/app/current && ln -s /opt/app/noelwilson_${TODAY} /opt/app/current"

# Copy nginx conf
scp ./ops/default.conf root@${SERVER_IP}:/etc/nginx/sites-enabled/default

# Copy supervisor conf
scp ./ops/supervisor.conf root@${SERVER_IP}:/etc/supervisor/conf.d/noelwilson.conf

# Run make setup on box
ssh root@${SERVER_IP} "rm -rf /opt/app/current/client/node_modules"
ssh root@${SERVER_IP} "cd /opt/app/current/ && make build && make setup && make run-fe-build"

ssh root@${SERVER_IP} "supervisorctl restart all"
ssh root@${SERVER_IP} "systemctl restart nginx"<commit_msg>Adding remove existing docker processes command<commit_after>#! /bin/bash
PROJECT_ID=jwnwilson-eu
SERVER_IP="172.16.17.32"
TODAY=$(date +"%m_%d_%Y")


# Copy project to server
zip -r /tmp/project.zip . -x ./server/venv/**\* ./server/.cov/**\* ./client/node_modules/**\*
scp /tmp/project.zip root@${SERVER_IP}:/tmp/project.zip
ssh root@${SERVER_IP} "unzip /tmp/project.zip -d /opt/app/noelwilson_${TODAY}"
ssh root@${SERVER_IP} "rm /opt/app/current && ln -s /opt/app/noelwilson_${TODAY} /opt/app/current"

# Copy nginx conf
scp ./ops/default.conf root@${SERVER_IP}:/etc/nginx/sites-enabled/default

# Copy supervisor conf
scp ./ops/supervisor.conf root@${SERVER_IP}:/etc/supervisor/conf.d/noelwilson.conf

# Run make setup on box
ssh root@${SERVER_IP} "docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)"
ssh root@${SERVER_IP} "rm -rf /opt/app/current/client/node_modules"
ssh root@${SERVER_IP} "cd /opt/app/current/ && make build && make setup && make run-fe-build"

ssh root@${SERVER_IP} "supervisorctl restart all"
ssh root@${SERVER_IP} "systemctl restart nginx"
{'fraction_non_alphanumeric': 0.18513047759724274, 'fraction_numerical': 0.008862629246676515, 'mean_word_length': 4.506775067750677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1299377', 'n_tokens_mistral': 830, 'n_tokens_neox': 768, 'n_words': 170}