docker improvements
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-01-19 10:39:47 +01:00
parent 971ea0d205
commit 01aa81bd15
2 changed files with 19 additions and 8 deletions

View File

@@ -1,11 +1,15 @@
FROM python:3.7
FROM python:3.8-alpine as base
FROM base as builder
RUN mkdir /install
WORKDIR /install
COPY requirements.txt /requirements.txt
RUN pip install --install-option="--prefix=/install" -r /requirements.txt
FROM base
COPY --from=builder /install /usr/local
RUN useradd --create-home appuser
COPY requirements.txt /home/appuser
RUN pip install -r /home/appuser/requirements.txt
WORKDIR /home/appuser
USER appuser

View File

@@ -2,12 +2,18 @@
This automatically sending pushover messages when a lent item is about to be returned, while also extending the period of the lending if possible.
It will remind you 20 and 15 days before you have to return the media And if there are only 10 or less days left, it gets pretty annoying and bothers you each and every day, till you return it.
It's not much code nor is it complicated, but maybe it prevents someone else from paying for books kept to long.
Configure the docker container with the following variables.
## Docker Config
### Required
The container by default keeps running. It sleeps till it is time to check again. But you can configure it to be a one shot.
It does not keep any track of any data.
### Required
- `PUSHOVER_KEY` Your pushover API Key
- `PUSHOVER_CLIENTS` A comma seperated list of pushover client ids. All the notifications will be sent to this ids
- `BIB_USERS` A comma seperated list of combinations of <USER>:<PWD> combinations to check and extend lent items.
@@ -19,6 +25,7 @@ Configure the docker container with the following variables.
- `RUN_AT_MINUTE` Check at minute, default 0
- `HEALTHCHECK_URL` OPTIONAL url for performing a healthcheck (see healthckeck.io for details)
- `NOTIFY_USERS` A coma separated list of <USER>:<pushover client id> tulles to send pushover messages selectivly
- `RUN_FOREVER` If set to `False` (mind the capitalization) the container will only perform a one time check. This way you could trigger it externally e.g. using cron.
### Example:
@@ -26,5 +33,5 @@ Configure the docker container with the following variables.
PUSHOVER_KEY=abcdef1234567890abcdef12345678
HEALTHCHECK_URL=https://healthcheck.io/ping/0000000-0000-0000-0000-000000000000
BIB_USERS=400001234567:password,40000987654:drowssap
NOTIFY_USERS= 400001234567:12345678abcdef1234567890abcdef,40000987654:12345678abcdef1234567890abcdef
NOTIFY_USERS=400001234567:12345678abcdef1234567890abcdef,40000987654:12345678abcdef1234567890abcdef
```