<commit_before>MetaSeek is a data discovery and analysis tool for genome sequencing data. Providing a rich front-end for exploration of metadata across a wide set of data repositories, use MetaSeek to find the right aggregation of sequences for your analysis, and then access the raw sequencing data.

To add sample data to the DB, unzip bootstrapData.zip into a folder named bootstrapData in the project root, and then read:

```python bootstrap.py```

To clear the local memcached cache during testing:

```echo 'flush_all' | nc localhost 11211```<commit_msg>Add notes on deploying both frontend and backend<commit_after>MetaSeek is a data discovery and analysis tool for genome sequencing data. Providing a rich front-end for exploration of metadata across a wide set of data repositories, use MetaSeek to find the right aggregation of sequences for your analysis, and then access the raw sequencing data.

To add sample data to the DB, unzip bootstrapData.zip into a folder named bootstrapData in the project root, and then run:

`python bootstrap.py`

#### Frontend deploy notes

Merge master into deploy branch:

`git checkout deploy`

`git merge master`

Build a production javacript bundle:

`cd client`

`gulp build`

Deploy the bundle to Firebase (this will require you to log in with Firebase):

`cd build`

`firebase deploy`

#### Backend deploy notes

Merge master into deploy branch:

`git checkout deploy`

`git merge master`

Upload server directory to AWS - TODO this should obviously be a git pull instead:

`scp -r -i "metaseek.pem" ./server ubuntu@ec2-35-166-20-248.us-west-2.compute.amazonaws.com:`

SSH in:

`ssh -i "metaseek.pem" ubuntu@ec2-35-166-20-248.us-west-2.compute.amazonaws.com`

Open the server folder and activate the virtualenv:

`cd ~/server`

`source ./bin/activate`

Reset the DBs - run any pending database migrations and flush the cache:

`python manage.py db upgrade`

`echo 'flush_all' | nc localhost 11211`

Restart Apache:

`sudo apachectl restart`

Check the server is live:

`curl https://api.metaseek.cloud/api/users`

To debug:

`cat /var/log/apache2/error.log`
{'fraction_non_alphanumeric': 0.07396870554765292, 'fraction_numerical': 0.016595542911332386, 'mean_word_length': 4.494791666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '5901493', 'n_tokens_mistral': 656, 'n_tokens_neox': 602, 'n_words': 287}