AI Implementation feature(1089): Scheduled Execution with Cron and Retry Handling (#9)
This commit was merged in pull request #9.
This commit is contained in:
+8
-2
@@ -11,6 +11,7 @@ RUN apt-get update \
|
||||
git \
|
||||
ca-certificates \
|
||||
tzdata \
|
||||
util-linux \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd --system bot \
|
||||
@@ -27,14 +28,19 @@ RUN pip install --no-cache-dir --upgrade pip \
|
||||
|
||||
COPY --chown=bot:bot crontab/ /app/crontab/
|
||||
COPY --chown=bot:bot entrypoint.sh /app/entrypoint.sh
|
||||
COPY --chown=bot:bot run-bot.sh /app/run-bot.sh
|
||||
COPY --chown=root:root run-bot.sh /usr/local/bin/run-bot.sh
|
||||
COPY --chown=bot:bot src/ /app/src/
|
||||
|
||||
RUN chmod 0755 /app/entrypoint.sh \
|
||||
&& chmod 0755 /app/crontab/install-cron.sh \
|
||||
&& chmod 0755 /app/run-bot.sh \
|
||||
&& chmod 0755 /usr/local/bin/run-bot.sh \
|
||||
&& chmod 0644 /app/crontab/tenbackward.cron
|
||||
|
||||
ENV PYTHONPATH=/app/src
|
||||
|
||||
USER bot
|
||||
|
||||
# Note: entrypoint.sh runs as root so it can install /etc/cron.d/tenbackward
|
||||
# and exec cron -f. The cron-launched wrapper drops to the unprivileged
|
||||
# `bot` user before invoking Python.
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user