From 8d2470e70404b378a40f856ae25bc2794c19e474 Mon Sep 17 00:00:00 2001 From: David Trattnig <david@subsquare.at> Date: Mon, 29 Nov 2021 18:24:03 +0100 Subject: [PATCH] Add details on Gunicorn and config. --- README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f9b3784..0287ece 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ 2. [Extending the API](#extending-the-api) 3. [Creating a local image](#creating-a-local-image) 4. [Publish new image](#publish-new-image) + 6. [Logging](#logging) 2. [About](#about) <!-- /TOC --> @@ -120,6 +121,10 @@ If you are not planning to go with Docker or just want to setup a local developm - [`git`](https://git-scm.com/) - [PostgreSQL 13+](https://www.postgresql.org/) +For Production use you also need following: + +- [Gunicorn](https://gunicorn.org/), or any other compatible WSGI server + ### Installation Create a virtual environment for your Python dependencies: @@ -155,10 +160,19 @@ You might want to change the password for the database user created by the relev ### Configuration -Copy the sample configuration file in `./config/sample/sample-production.engine-api` to `config` and edit the file. +Create a config file from the sample configuration file: + +```bash +# Development +engine-api$ cp config/sample/sample-development.engine-api.ini config/engine-api.ini +# Production +engine-api$ cp config/sample/sample-production.engine-api.ini config/engine-api.ini +``` -First update the main configuration, such as your database connection and the default port. Also set the correct IP -and port in `gunicorn.conf.py` file. +Now edit the configuration file. If you trust all the defaults you'll only need to change the database password. + +For some deployment like production you may want to change the default port too. +In this case also set the correct IP and port in `gunicorn.conf.py` file. > You might also need to 'open' the chosen port in your `iptables` (Default is 8008) @@ -404,6 +418,10 @@ If you are developer and want to publish a new image to DockerHub, run ./run.sh docker:push ``` +## Logging + +The Engine API logs can be found under `./logs`. + # About Aura Engine API is the API interface for the play-out engine of the [Aura Radio Software Suite](https://gitlab.servus.at/aura/meta). -- GitLab