From a2a4461e16e68ee71c9e679243d3801ca66fb1aa Mon Sep 17 00:00:00 2001 From: Faelix Incident Handler Date: Sat, 16 Jun 2018 14:29:23 +0000 Subject: [PATCH] add gunicorn for running it "properly" --- Pipfile | 1 + Pipfile.lock | 10 +++++++++- README.md | 21 +++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index dbd539d..6f4f14a 100644 --- a/Pipfile +++ b/Pipfile @@ -8,6 +8,7 @@ mattermostdriver = "*" flask = "*" pyyaml = "*" python-slugify = "*" +gunicorn = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 0f66b0b..2092333 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "31eb45108631835f87cc03f5f2cd26b298bb72a2202f54e097e9a119a167e54b" + "sha256": "1dc0b95fc6afe46b7710e46f0e1c2bfd8d82cc2884e36128af6371384ea0adeb" }, "pipfile-spec": 6, "requires": { @@ -45,6 +45,14 @@ "index": "pypi", "version": "==1.0.2" }, + "gunicorn": { + "hashes": [ + "sha256:7ef2b828b335ed58e3b64ffa84caceb0a7dd7c5ca12f217241350dec36a1d5dc", + "sha256:bc59005979efb6d2dd7d5ba72d99f8a8422862ad17ff3a16e900684630dd2a10" + ], + "index": "pypi", + "version": "==19.8.1" + }, "idna": { "hashes": [ "sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e", diff --git a/README.md b/README.md index 2518000..e932855 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ +## Installation + +We are using [Pipenv](https://docs.pipenv.org) to make our lives easier: + +```sh +git clone https://gitea.faelix.net/FAELIX/incident_handler.git +cd incident_handler +pipenv install --three +``` + +## Configuration + Example `settings.cfg` file: ```python @@ -22,3 +34,12 @@ PUBLIC_INCIDENT_PREFIX = "FI#" STATUS_PAGE_URL = "https://status.faelix.net/" INCIDENT_URL_SCHEME = STATUS_PAGE_URL + "event/%s/" ``` + +## Running + +```sh +export FIH_SETTINGS=~/incident_handler/settings.cfg +export FLASK_APP=fih.py +cd ~/incident_handler +flask run -p 3333 +```