Faelix's Incident Handler which powers https://status.faelix.net/ via Mattermost and Grow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Marek Isalski e98e5143e2 add year to YAML data 1 year ago
.hgignore add a README file 1 year ago
Pipfile add gunicorn for running it "properly" 1 year ago
Pipfile.lock add gunicorn for running it "properly" 1 year ago
README.md add information about running with gunicorn 1 year ago
event.py add year to YAML data 1 year ago
fih.py add year to YAML data 1 year ago

README.md

Installation

We are using Pipenv to make our lives easier:

git clone https://gitea.faelix.net/FAELIX/incident_handler.git
cd incident_handler
pipenv install --three

Configuration

Example settings.cfg file:

FIH_ROOT = "/home/status/incident_handler"
STATUS_ROOT = "/home/status/status.example.com"
STATUS_EVENT_SCHEME = STATUS_ROOT + "/content/event/%(incident_number)s-%(slug)s.md"
STATUS_EVENT_GLOB = STATUS_ROOT + "/content/event/%(incident_number)s*.md"
STATUS_EVENT_INDEX = STATUS_ROOT + "/content/pages/index.md"
MERCURIAL_BIN = "/usr/bin/hg"
GROW_BIN = "/usr/local/bin/grow"
MERCURIAL_PUSH_TO = [ "c3", "c4" ]
GROW_DEPLOY_TO = [ "c3", "c4" ]

MATTERMOST_COMMAND_TOKENS = [ "XXXXXXXXXXXXXXXXXXXXXXXXXX" ]
MATTERMOST_USER_EMAIL = "mattermostuser@example.com"
MATTERMOST_USER_PASSWORD = "XXXXXXXXXXXXXXXX"
MATTERMOST_URL = "mattermost.example.com"
MATTERMOST_PORT = 443

MATTERMOST_INCIDENT_CHANNEL_PREFIX = "incident"
PUBLIC_INCIDENT_PREFIX = "FI#"
STATUS_PAGE_URL = "https://status.faelix.net/"
INCIDENT_URL_SCHEME = STATUS_PAGE_URL + "event/%s/"

Running

export FIH_SETTINGS=~/incident_handler/settings.cfg
export FLASK_APP=fih.py
cd ~/incident_handler

# for development
flask run -p 3333

# for production
gunicorn -w 4 -b 127.0.0.1:3333 fih:app