<commit_before># sciNote

![sciNote logo](http://scinote.net/wp-content/uploads/2015/10/logo_sciNote_final.png)

## About

sciNote is an open source electronic lab notebook ([ELN](https://en.wikipedia.org/wiki/Electronic_lab_notebook)) that helps you manage your laboratory work and stores all your experimental data in one place. sciNote is specifically designed for life science students, researchers, lab technicians and group leaders.

## Build & run

sciNote is developed in [Ruby on Rails](http://rubyonrails.org/). It also makes use of [Docker](https://www.docker.com/) technology, so the easiest way to run it is inside Docker containers.

### Quick start

The following are minimal steps needed to start sciNote in development environment:

1. Clone this Git repository onto your development machine.
2. Create a file `config/application.yml`. Populate it with mandatory environmental variables (see [environmental variables](#user-content-environmental-variables)).
3. In sciNote folder, run the following command: `make docker`. This can take a while, since Docker must first pull an image from the Internet, and then also install all neccesary Gems required by sciNote.
4. Once the Docker image is created, run `make cli` command. Once inside the running Docker container, run the following command: `rake db:reset`. This should initialize the database and fill it with (very minimal) seed data.
5. Exit the Docker container by typing `exit`.
6. To start the server, run command `make run`. Wait until the server starts listening on port `3000`.
7. Open your favourite browser and navigate to [http://localhost:3000](http://localhost:3000/). Use the seeded administrator account from [seeds.rb](db/seeds.rb) to login, or sign up for a new account.

### Docker structure

The main sciNote application runs in a Docker container called `web`. The database runs in a separate container, called `db`. This database container makes use of a special, persistent container called `dbdata`.

### Commands

Call `make` commands to build Docker images and build Rails environment, including database.

Following commands are available:

| Command        | Description                                                                                     |
|----------------|-------------------------------------------------------------------------------------------------|
| `make docker`  | Downloads the Docker image and build Gems. This should be called whenever `Gemfile` is changed. |
| `make db-cli`  | Runs a `/bin/bash` inside the `db` container.                                                   |
| `make run`     | Runs the `db` container & starts the Rails server in `web` container.                           |
| `make start`   | Runs the `db` container & starts the Rails server in `web` container in background.             |
| `make stop`    | Stops the `db` & `web` containers.                                                              |
| `make cli`     | Runs a `/bin/bash` inside the `web` container.                                                  |<commit_msg>Added Debian Specific Instructions (#10)<commit_after># sciNote

![sciNote logo](http://scinote.net/wp-content/uploads/2015/10/logo_sciNote_final.png)

## About

sciNote is an open source electronic lab notebook ([ELN](https://en.wikipedia.org/wiki/Electronic_lab_notebook)) that helps you manage your laboratory work and stores all your experimental data in one place. sciNote is specifically designed for life science students, researchers, lab technicians and group leaders.

## Build & run

sciNote is developed in [Ruby on Rails](http://rubyonrails.org/). It also makes use of [Docker](https://www.docker.com/) technology, so the easiest way to run it is inside Docker containers.

### Quick start

The following are minimal steps needed to start sciNote in development environment:

1. Clone this Git repository onto your development machine.
2. Create a file `config/application.yml`. Populate it with mandatory environmental variables (see [environmental variables](#user-content-environmental-variables)).
3. In sciNote folder, run the following command: `make docker`. This can take a while, since Docker must first pull an image from the Internet, and then also install all neccesary Gems required by sciNote.
4. Once the Docker image is created, run `make cli` command. Once inside the running Docker container, run the following command: `rake db:reset`. This should initialize the database and fill it with (very minimal) seed data.
5. Exit the Docker container by typing `exit`.
6. To start the server, run command `make run`. Wait until the server starts listening on port `3000`.
7. Open your favourite browser and navigate to [http://localhost:3000](http://localhost:3000/). Use the seeded administrator account from [seeds.rb](db/seeds.rb) to login, or sign up for a new account.

### Debian Specific Install Instructions

1. Install Docker and add user 1000 to the docker group as described here [https://docs.docker.com/engine/installation/linux/debian/] (https://docs.docker.com/engine/installation/linux/debian/).
2. Install Docker Compose as described here [https://docs.docker.com/compose/install/] (https://docs.docker.com/compose/install/).
3. Follow Quick Start Guide above as user 1000.

### Docker structure

The main sciNote application runs in a Docker container called `web`. The database runs in a separate container, called `db`. This database container makes use of a special, persistent container called `dbdata`.

### Commands

Call `make` commands to build Docker images and build Rails environment, including database.

Following commands are available:

| Command        | Description                                                                                     |
|----------------|-------------------------------------------------------------------------------------------------|
| `make docker`  | Downloads the Docker image and build Gems. This should be called whenever `Gemfile` is changed. |
| `make db-cli`  | Runs a `/bin/bash` inside the `db` container.                                                   |
| `make run`     | Runs the `db` container & starts the Rails server in `web` container.                           |
| `make start`   | Runs the `db` container & starts the Rails server in `web` container in background.             |
| `make stop`    | Stops the `db` & `web` containers.                                                              |
| `make cli`     | Runs a `/bin/bash` inside the `web` container.                                                  |
{'fraction_non_alphanumeric': 0.1154776299879081, 'fraction_numerical': 0.0095223700120919, 'mean_word_length': 2.5385026737967915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7671993', 'n_tokens_mistral': 1650, 'n_tokens_neox': 1511, 'n_words': 750}