<commit_before>## Deploy to production

### Regular deployment



### Build production image if it has changed


Create a file `./deploy_env` and set production secrets and configurations

```bash
# Example ./deploy_env


SECRET_KEY_BASE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Twilio account
TWILIO_AUTH_TOKEN=<KEY>
TWILIO_ACCOUNT_SID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_NUMBER="+46000000000"

DOCKER_MACHINE_PRODUCTION_NAME=chefstable_prod
```

Now, just run `bin/deploy` and wait for it to complete

### Initial deployment to new server

Start by tell docker to use the correct environment

Example `eval "$(docker-machine env the_new_chefstable_server)"`

#### Setup database containers

Create a docker container to store the database data

```bash
docker create -v /var/lib/postgresql/data --name db-data postgres:9.5 /bin/true
```
<commit_msg>Add mailgun auth instruction<commit_after>## Deploy to production

### Regular deployment



### Build production image if it has changed


Create a file `./deploy_env` and set production secrets and configurations

```bash
# Example ./deploy_env


SECRET_KEY_BASE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Twilio account
TWILIO_AUTH_TOKEN=<KEY>
TWILIO_ACCOUNT_SID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_NUMBER="+46000000000"

# Mailgun auth
MAILGUN_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

DOCKER_MACHINE_PRODUCTION_NAME=chefstable_prod
```

Now, just run `bin/deploy` and wait for it to complete

### Initial deployment to new server

Start by tell docker to use the correct environment

Example `eval "$(docker-machine env the_new_chefstable_server)"`

#### Setup database containers

Create a docker container to store the database data

```bash
docker create -v /var/lib/postgresql/data --name db-data postgres:9.5 /bin/true
```

{'fraction_non_alphanumeric': 0.07381193124368049, 'fraction_numerical': 0.01314459049544995, 'mean_word_length': 6.582375478927203, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 7, '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': '6753299', 'n_tokens_mistral': 737, 'n_tokens_neox': 547, 'n_words': 172}