diff --git a/updater/Dockerfile b/updater/Dockerfile index d08e171..a15a35b 100644 --- a/updater/Dockerfile +++ b/updater/Dockerfile @@ -27,7 +27,7 @@ COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} ARG CRON="0 0 * * *" -RUN echo "${CRON} /app/.venv/bin/python /app/src/updater/main.py >> /var/log/cron.log 2>&1" > crontab +RUN echo "${CRON} /app/.venv/bin/python /app/src/updater/main.py > /tmp/stdout 2> /tmp/stderr" > crontab RUN crontab crontab COPY src ./app/src diff --git a/updater/entrypoint.sh b/updater/entrypoint.sh index 2a3eb9e..104b02f 100644 --- a/updater/entrypoint.sh +++ b/updater/entrypoint.sh @@ -1,4 +1,12 @@ #!/bin/sh +# Make sure cron can see environment variables printenv >> /etc/environment + +# Set up stdour and stderr for docker logs +mkfifo /tmp/stdout /tmp/stderr +chmod 0666 /tmp/stdout /tmp/stderr +tail -f /tmp/stdout & +tail -f /tmp/stderr >&2 & + cron -f \ No newline at end of file