From 46d69635347fdbccd2158154992bef8fcb0cbc16 Mon Sep 17 00:00:00 2001 From: Enrico Ghidoni Date: Tue, 26 Mar 2024 19:09:14 +0100 Subject: [PATCH] Clean-up directories for use inside Docker --- Dockerfile | 10 ++++------ crontab.txt | 2 +- op-reminder.sh | 4 +--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index e1c0ecd..af4a57b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,10 @@ FROM alpine:3.19 -COPY owlbot-repo /owlbot - -WORKDIR owlbot +ADD . /owlbot +WORKDIR /owlbot RUN apk add --no-cache python3 py3-pip RUN pip install --break-system-packages -r requirements.txt -RUN crontab crontab.txt - +RUN crontab crontab.txt -CMD ["sh"] \ No newline at end of file +CMD ["crond", "-f"] \ No newline at end of file diff --git a/crontab.txt b/crontab.txt index 8acaf97..1a9471a 100644 --- a/crontab.txt +++ b/crontab.txt @@ -1 +1 @@ -35 19 * * 2,5 bash /discord-owlbot/op-reminder.sh >> /discord-owlbot/log 2>&1 \ No newline at end of file +35 19 * * 2,5 sh /owlbot/op-reminder.sh diff --git a/op-reminder.sh b/op-reminder.sh index 481fc2e..26f89af 100755 --- a/op-reminder.sh +++ b/op-reminder.sh @@ -1,3 +1 @@ -source ~/miniconda3/etc/profile.d/conda.sh -conda activate discord-owlbot -python /home/carpenoctem/discord-owlbot/op-start-reminder.py +python /owlbot/op-start-reminder.py > /owlbot/cron.log 2>&1