This commit is contained in:
2021-02-22 13:02:14 +01:00
parent 68a71d2266
commit b0223cff24
3 changed files with 10 additions and 8 deletions

View File

@ -4,7 +4,7 @@ LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
LABEL ImageName="registry.hottis.de/dockerized/cron-docker"
ARG SMARTHOST="172.16.11.15"
ARG ADMINUSER="wolfgang.hottgenroth@icloud.com"
ARG MAILDOMAIN="hottis.de"
ARG APP_DIR="/opt/app"
RUN \
@ -18,13 +18,11 @@ RUN \
sed -i \
-e "s/dc_eximconfig_configtype='local'/dc_eximconfig_configtype='satellite'/" \
-e "s/dc_smarthost=''/dc_smarthost='${SMARTHOST}'/" \
-e "s/dc_readhost=''/dc_readhost='${MAILDOMAIN}'/" \
/etc/exim4/update-exim4.conf.conf && \
env DEBIAN_FRONTEND=noninteractive dpkg-reconfigure -f debconf exim4-config && \
mkdir -p ${APP_DIR} && \
useradd -d ${APP_DIR} -u 1000 user && \
echo "root: ${ADMINUSER}" >> /etc/aliases && \
echo "user: ${ADMINUSER}" >> /etc/aliases && \
newaliases
useradd -d ${APP_DIR} -u 1000 user
COPY crontab /etc/
COPY *.py ${APP_DIR}/

View File

@ -33,7 +33,7 @@ try:
mietersToReport.append({
'vorname': mieter['vorname'],
'nachname': mieter['nachname'],
'saldo': "{10.2f}".format(saldoByMieter['saldo'])
'saldo': "{:.2f}".format(saldoByMieter['saldo'])
})
params = { 'mietersToReport': mietersToReport }
report = Template(file=TEMPLATE_FILE, searchList=[ params ])

View File

@ -1,11 +1,15 @@
<html>
<head></head>
<head>
<style type="text/css">
td.saldo { text-align: right }
</style>
</head>
<body>
<table>
#for $mieter in $mietersToReport
<tr>
<td>$mieter.vorname $mieter.nachname</td>
<td>$mieter.saldo €</td>
<td class="saldo">$mieter.saldo €</td>
</tr>
#end for
</table>