diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..25afd86 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM alpine:latest + +RUN apk add --no-cache bash curl py-pip + +COPY . /ausweisstatus +WORKDIR /ausweisstatus + +RUN python3 -m venv .venv +RUN source .venv/bin/activate && pip3 install -r requirements.txt + +COPY crontab /etc/crontabs/root + +CMD ["crond", "-f"] diff --git a/crontab b/crontab new file mode 100644 index 0000000..12e02cf --- /dev/null +++ b/crontab @@ -0,0 +1,2 @@ +* * * * * cd /ausweisstatus && WEBHOOK_URL="url_here" ./notify.sh P L7AAAAAAAA 01.01.1970 >> /var/log/L7 2>&1 +* * * * * cd /ausweisstatus && WEBHOOK_URL="url_here" ./notify.sh R C7AAAAAAAA 01.01.1970 >> /var/log/C7 2>&1 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..237852b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +--- +services: + ausweisstatus: + container_name: ausweisstatus + build: . diff --git a/notify.sh b/notify.sh index 95d8d87..d7882d6 100755 --- a/notify.sh +++ b/notify.sh @@ -4,8 +4,7 @@ # status has changed since the last execution # Usage: ./notify.sh