add notifier in docker

This commit is contained in:
Ville Rantanen
2018-02-19 14:55:59 +02:00
parent bde0df0462
commit 93961138c6
2 changed files with 4 additions and 1 deletions

View File

@@ -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.

View File

@@ -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