summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-06-01 22:07:33 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-06-01 22:07:33 +0900
commit694694e67936ccabb0f51edad7023c965850e310 (patch)
treecd8635e524aa1afb68459be3423d920c28fc2bf7 /Dockerfile
parent3a961122bdf64cf72cf1b3770e9d71865a3aac52 (diff)
Add daily recap email job via Postfix MTA container
Sends an HTML digest of the next 7 days' events to efemeraladdress+golive@gmail.com at 08:00 JST daily (23:00 UTC cron). Adds scraper to the web Docker network so it can reach mail:25. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 0bc37da..9eab66d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -37,7 +37,10 @@ COPY scripts ./scripts
COPY app ./app
COPY tsconfig.json ./
RUN apt-get update && apt-get install -y cron && rm -rf /var/lib/apt/lists/*
-RUN echo '0 */6 * * * root cd /app && DB_PATH=/app/data/events.db node --import tsx/esm scripts/scrape.ts >> /app/data/scraper.log 2>&1' > /etc/cron.d/scraper \
+RUN printf '%s\n%s\n' \
+ '0 */6 * * * root cd /app && DB_PATH=/app/data/events.db node --import tsx/esm scripts/scrape.ts >> /app/data/scraper.log 2>&1' \
+ '0 23 * * * root cd /app && DB_PATH=/app/data/events.db node --import tsx/esm scripts/send-recap.ts >> /app/data/recap.log 2>&1' \
+ > /etc/cron.d/scraper \
&& chmod 0644 /etc/cron.d/scraper
RUN mkdir -p /app/data
COPY scripts/scraper-entrypoint.sh ./scripts/scraper-entrypoint.sh