From 58c1333570601e05705439295d376edcf5144ee0 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 22 Feb 2021 10:58:50 +0100 Subject: [PATCH] changes --- Dockerfile | 10 +++++----- build.sh | 8 ++++++++ crontab | 2 ++ monatliche-forderung-eintragen.py | 3 +++ monatliche-forderung-ueberwachen.py | 4 ++++ 5 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 build.sh create mode 100644 crontab create mode 100644 monatliche-forderung-eintragen.py create mode 100644 monatliche-forderung-ueberwachen.py diff --git a/Dockerfile b/Dockerfile index e4e495c..bd03f97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,16 +20,16 @@ RUN \ -e "s/dc_smarthost=''/dc_smarthost='${SMARTHOST}'/" \ /etc/exim4/update-exim4.conf.conf && \ env DEBIAN_FRONTEND=noninteractive dpkg-reconfigure -f debconf exim4-config && \ - echo "root: ${ADMINUSER}" >> /etc/aliases && \ - newaliases && \ mkdir -p ${APP_DIR} && \ - useradd -d ${APP_DIR} -u 1000 user + useradd -d ${APP_DIR} -u 1000 user && \ + echo "root: ${ADMINUSER}" >> /etc/aliases && \ + echo "user: ${ADMINUSER}" >> /etc/aliases && \ + newaliases USER 1000:1000 WORKDIR ${APP_DIR} -VOLUME /etc/cron.d -VOLUME ${APP_DIR} +CMD [ "/usr/sbin/cron", "-f", "-L /dev/stdout" ] diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..4e218ce --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +IMAGE_NAME="registry.hottis.de/hv/hv-cron" +VERSION=0.0.1 + +docker build -t ${IMAGE_NAME}:${VERSION} . +docker push ${IMAGE_NAME}:${VERSION} + diff --git a/crontab b/crontab new file mode 100644 index 0000000..c7645a8 --- /dev/null +++ b/crontab @@ -0,0 +1,2 @@ +0 0 1 * * user /opt/app/monatliche-forderung-eintragen.py +0 1 * * * user /opt/app/monatliche-forderung-ueberwachen.py diff --git a/monatliche-forderung-eintragen.py b/monatliche-forderung-eintragen.py new file mode 100644 index 0000000..94c6d3d --- /dev/null +++ b/monatliche-forderung-eintragen.py @@ -0,0 +1,3 @@ +#!/usr/bin/python3 + +print("Monatliche Forderung eintragen") diff --git a/monatliche-forderung-ueberwachen.py b/monatliche-forderung-ueberwachen.py new file mode 100644 index 0000000..56f4eca --- /dev/null +++ b/monatliche-forderung-ueberwachen.py @@ -0,0 +1,4 @@ +#!/usr/bin/python3 + +print("Monatliche Forderung ueberwachen") +