commit c1ede8228561d4f690f5e17a752bcd49ed9a0a64 Author: Roman Steiner Date: Sun Jul 18 12:53:07 2021 +0200 basic version diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b260d35 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.8' + +services: + covid-collector: + build: + context: ./image + restart: always + container_name: covid-collector + volumes: + - "./data:/root/data" + diff --git a/image/Dockerfile b/image/Dockerfile new file mode 100644 index 0000000..0162778 --- /dev/null +++ b/image/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.9-buster + +RUN apt-get update; apt-get install --no-install-recommends cron + +RUN touch /var/log/cron.log +COPY collect.sh /root/collect.sh +RUN echo '*/2 * * * * root /root/collect.sh' >> /etc/crontab + +CMD ["/bin/bash", "-c", "cron && tail -f /var/log/cron.log"] + diff --git a/image/collect.sh b/image/collect.sh new file mode 100644 index 0000000..28d21ed --- /dev/null +++ b/image/collect.sh @@ -0,0 +1,6 @@ +!/bin/bash + +# download Covid-Cases for Austria based on age groupes +wget --output-document=/root/data/CovidFaelle_Altersgruppe-$(date +%F_%T).csv https://covid19-dashboard.ages.at/data/CovidFaelle_Altersgruppe.csv + +