<commit_before># LayersBox
An npm- and bower-like script to setup and configure a Docker host with a reverse proxy serving various microservices - the Layers Box.

# Installation
1. Clone the repository
2. run `python setup.py --user` to install the layersbox command for your current user. You don't need to install it, but if you don't, make sure that you install the needed packages.

# Usage
* run `layersbox init` to initialize a Layers Box with the nginx (the Layers Adapter) and MySQL
* run `layersbox start` to start the Layers Box
* run `layersbox stop` to stop the Layers Box
* run `layersbox status` to see the status of the currently deployed services
* run `layersbox install repo#version` to install a new service on the Layers Box, e.g. `layersbox install learning-layers/documentation#0.0.1`

# Conventions
1. In your docker-compose.yml, you must name the resulting container the exact same way you name your service in your nginx.conf.
2. There are some limitations on the names you may assign to your services imposed by the current Docker Compose implementation stage. Among others, it is strongly recommended you name your services and containers only with lowercase letters (no hyphens, no lowerscore, no digits).<commit_msg>Added some documentation<commit_after># LayersBox
An npm- and bower-like script to setup and configure a Docker host with a reverse proxy serving various microservices - the Layers Box.

# Try It Out!
For now, we think the best way to try out `layersbox` is on an Ubuntu server. We have put online a short tutorial on how to set up your test environment: http://developer.learning-layers.eu/documentation/layers-box/environment-setup/

# Installation
1. Clone the repository: `git clone https://github.com/learning-layers/LayersBox.git`

# Usage
* run `layersbox init` to initialize a Layers Box with Nginx (the Layers Adapter) and MySQL
* run `layersbox start` to start the Layers Box
* run `layersbox stop` to stop the Layers Box
* run `layersbox status` to see the status of the currently deployed services
* run `layersbox install repo#version` to install a new service on the Layers Box, e.g. `layersbox install learning-layers/documentation#0.0.1`

# How It Works
`layersbox` is a Python script that makes it easy to install new software packages on your server. All you need is a Docker and Docker Compose installation. It heavily relies on Docker Compose for starting your Web app containers. Whenever you type `layersbox install repo#version`, it will download the latest release of the `repo` from GitHub. Then, it gets the `docker-compose.yml` file from the repo and combines it with the existing docker-compose.yml of the Layers Box. The great thing when instantiating the combined file is that already running containers are not shut down. Only the new ones are started and linked to the existing ones.

Besides adding new containers, the script can also perform some `Actions`: http://developer.learning-layers.eu/documentation/layers-box/actions/
For example, `layersbox` enters your Web app into the Nginx config file (in our terminology, we often say 'Layers Adapter' instead of 'Nginx'). Therefore it reads out the content of your `nginx.conf` file and adds it to the configuration of Nginx. Then, Nginx is instructed to reload its configuration. Your Web app is then served through the Layers Adapter.

# Conventions
1. In your docker-compose.yml, you must name the resulting container the exact same way you name your service in your nginx.conf.
2. There are some limitations on the names you may assign to your services imposed by the current Docker Compose implementation stage. Among others, it is strongly recommended you name your services and containers only with lowercase letters (no hyphens, no lowerscore, no digits).

# F&Q
{'fraction_non_alphanumeric': 0.05473684210526316, 'fraction_numerical': 0.0034210526315789475, 'mean_word_length': 4.557017543859649, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '582144', 'n_tokens_mistral': 996, 'n_tokens_neox': 939, 'n_words': 564}