From 93961138c66a425b29ea9d6077fe57507fd39274 Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Mon, 19 Feb 2018 14:55:59 +0200 Subject: [PATCH] add notifier in docker --- README.md | 4 +++- code/Dockerfile | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a956ae9..b535c54 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ The name comes from mispronouncing "files" very badly. - `cp env.example .env` - `cp data/config.json.example data/config.json` - `cp data/shares.json.example data/shares.json` +- `touch code/notifier.py` - `docker-compose up --build` - open URL: http://localhost:8136/list/test @@ -50,7 +51,8 @@ location /flees/ { # custom notifier - Add a notifier module, and refer to it in the config with: - 'notifier': 'python-path-to-file:class-name' + "notifier": "python-path-to-file:class-name" + ex.: "notifier": "notifier:Notifier" - The class must have method `def notify(self, message)` Check the notifier.py.template for clues. diff --git a/code/Dockerfile b/code/Dockerfile index b5d9329..7925247 100644 --- a/code/Dockerfile +++ b/code/Dockerfile @@ -9,6 +9,7 @@ RUN pip3 install -r /requirements.txt COPY static /code/static COPY templates /code/templates COPY revprox.py /code/revprox.py +COPY notifier.py /code/notifier.py COPY app.py /code/app.py COPY start_app.py /code/start_app.py WORKDIR /code