From 485d8cfaa46149badeb370d0a85d2af3b4217452 Mon Sep 17 00:00:00 2001
From: David Trattnig <david.trattnig@o94.at>
Date: Wed, 29 Apr 2020 20:39:48 +0200
Subject: [PATCH] Full documentation for dev and prod environments.

---
 README.md | 129 ++----------------------------------------------------
 1 file changed, 3 insertions(+), 126 deletions(-)

diff --git a/README.md b/README.md
index 0247ccf..0dbbeec 100644
--- a/README.md
+++ b/README.md
@@ -13,12 +13,6 @@ specifically build for the requirements of community radios.
     - [Features](#features)
     - [Architecture](#architecture)
     - [Installation](#installation)
-    - [Configuration](#configuration)
-    - [Running Engine](#running-engine)
-        - [Development](#development)
-        - [Production](#production)
-            - [API Server](#api-server)
-    - [Logging](#logging)
     - [About](#about)
     - [Resources](#resources)
 
@@ -51,127 +45,10 @@ To learn more, checkout the [Engine Developer Guide](docs/developer-guide.md) or
 
 ## Installation
 
-Aura Engine runs on any modern Debian-based OS. It requires at least `Node 13`, `Python 3.7`. 
+- [Installation for Development](docs/installation-development.md)
+- [Installation for Production](docs/installation-production.md)
+- [Installation using Docker](docs/installation-docker.md)
 
-You also need to install `Liquidsoap 1.4.1` using [OPAM](https://www.liquidsoap.info/doc-1.4.1/install.html).
-
-Then do
-
-```bash
-git clone https://gitlab.servus.at/autoradio/engine
-```
-
-By default Aura Engine uses MariaDB for persistence. When starting the installation, please
-ensure you have root access to your database instance. The installation script automatically
-creates a database plus an associated user with password. If you want to use your own database
-system, select "Other / Manually" during the database installation step.
-
-Development Environment
-
-```bash
-sudo ./install.sh
-```
-
-Production Environment
-
-```bash
-sudo ./install.sh prod
-```
-
-
-## Configuration
-
-In your development environment edit the file
-
-```shell
-./configuration/engine.ini
-```
-
-to configure the engine.
-
-In production, or if the file exists, Engine uses the config location
-
-```shell
-/etc/aura/engine.ini
-```
-
-Read more about detailed settings in the [Configuration Guide](docs/configuration-guide.md).
-
-## Running Engine
-
-### Development
-
-While developing there is a simple convencience script `run.sh`
-to get you started. Call the engine's components in following order:
-
-```shell
-    ./run.sh      # Starts the engine-core component
-    ./run.sh lqs  # Starts the engine-liquidsoap component
-    ./run.sh api  # Starts the engine-api component
-```
-
-In development mode Engine uses the [Flask](https://palletsprojects.com/p/flask/) development server.
-This server should not be used in your production environment.
-
-
-### Production
-
-In production the process is slightly different to ensure the
-engine's components are always running i.e. restart themselves after some system
-restart or crash. Therefore they are executed using a system service:
-
-```bash
-  systemctl start aura-engine  
-  systemctl start aura-lqs
-```
-
-and on system boot run following:
-
-```bash
-  systemctl enable aura-engine
-  systemctl enable aura-lqs
-```
-
-#### API Server
-
-For production Engine API uses the WSGI HTTP Server [`Gunicorn`](https://gunicorn.org/).
-
-In production Gunicorn is used in combination with some proxy server, such as Nginx.
-
-> Although there are many HTTP proxies available, we strongly advise that you use Nginx. If you choose another proxy server you need to make sure that it buffers slow clients when you use default Gunicorn workers. Without this buffering Gunicorn will be easily susceptible to denial-of-service attacks. You can use Hey to check if your proxy is behaving properly. — [**Gunicorn Docs**](http://docs.gunicorn.org/en/latest/deploy.html).
-
-
-
-
-[`Supervisor`](http://supervisord.org/) is a preferable solution to run the gunicorn server
-in the background and also start it automatically on reboot.
-
-**Start the API service with Supervisor**
-
-```shell
-    sudo supervisorctl reread
-    sudo supervisorctl update
-    sudo supervisorctl avail
-    sudo supervisorctl restart engine-api
-```
-
-In case you want to reload whole supervisor service
-
-```shell
-    sudo service supervisor restart
-```
-
-## Logging
-
-All Engine logs for production can be found in `/var/log/aura/engine`
-
-
-You can access the service logs using one of:
-
-```
-    journalctl -u aura-lqs
-    journalctl -u aura-engine
-```
 
 ## About
 
-- 
GitLab