<commit_before># Marshall Packaging System (MPS)

A tailored ruby on rails app for one of my customers.

## Build 

This application is composed of different micro-services controlled through docker containers. 

### Database

Please, type the following commands to create a data volume for persisting data into a db and afterward built the postgres image

```
docker run -d --name postgres_container -p 5432:5432 -e POSTGRES_USER=rails_user -e POSTGRES_PASSWORD=<PASSWORD>  -e POSTGRES_DB=devel -v pgvol:/var/lib/postgresql/data postgres:9.5.5
docker volume create --name pgvol
```

### Application

Please, type the following command to build a docker image with ruby, rails and any gem dependencies specified on src/Gemfile.

```
docker build -t ubuntu-rails .
```

## Run

It is crucial to follows the next steps as you reading them. 

### Database

```
docker run -d --name postgres_container -p 5432:5432 -e POSTGRES_PASSWORD=<PASSWORD> -e POSTGRES_USER=rails_user -e POSTGRES_DB=devel -v pgvol:/var/lib/postgresql/data postgres:9.5.5
```

Note, the first time you run the above mentioned command, you will need to ensure that POSGRES_USER has privileges to read/write on POSTGRES_DB. Please, visit the [link](https://www.postgresql.org/docs/9.5/static/sql-grant.html) for defining access privileges.

### Application

```
docker run --name rails_container -it --rm -p 3000:3000 -v "$PWD/src":/usr/src/app --link postgres_container:db ubuntu-rails:latest
```<commit_msg>README typos fixed<commit_after># Marshall Packaging System (MPS)

A tailored ruby on rails app for one of my customers.

## Build 

This application is composed of different micro-services controlled through docker containers. 

### Database

Please, type the following commands to create a data volume for persisting data into a db and afterwards built the postgres image:

```
docker run -d --name postgres_container -p 5432:5432 -e POSTGRES_USER=rails_user -e POSTGRES_PASSWORD=<PASSWORD>  -e POSTGRES_DB=devel -v pgvol:/var/lib/postgresql/data postgres:9.5.5
docker volume create --name pgvol
```

### Application

Please, type the following command to build a docker image with ruby, rails and any gem dependencies specified on src/Gemfile:

```
docker build -t ubuntu-rails .
```

## Run

It is crucial to follow below steps in order. 

### Database

```
docker run -d --name postgres_container -p 5432:5432 -e POSTGRES_PASSWORD=<PASSWORD> -e POSTGRES_USER=rails_user -e POSTGRES_DB=devel -v pgvol:/var/lib/postgresql/data postgres:9.5.5
```

Note, the first time you run the above mentioned command, you will need to ensure that POSGRES_USER has privileges to read/write on POSTGRES_DB. Please, visit the [link](https://www.postgresql.org/docs/9.5/static/sql-grant.html) for defining access privileges.

### Application

```
docker run --name rails_container -it --rm -p 3000:3000 -v "$PWD/src":/usr/src/app --link postgres_container:db ubuntu-rails:latest
```
{'fraction_non_alphanumeric': 0.10020380434782608, 'fraction_numerical': 0.021739130434782608, 'mean_word_length': 4.4036697247706424, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1905976', 'n_tokens_mistral': 1019, 'n_tokens_neox': 890, 'n_words': 343}