summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-06-04 20:26:33 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-06-04 20:26:33 +0900
commitf9cc6d3f2dc884739ea640ef54adaeb35d117220 (patch)
treef12a93e27bb316546a9e63f27068aa11b077c6d7 /Dockerfile
parente998e12aa5c07d923d91ff8e3d48867ec66d5b48 (diff)
Fix cron PATH: use absolute path for node in /etc/cron.d/scraper
cron runs with a minimal PATH that excludes /usr/local/bin, causing 'node: not found' errors for both scrape and recap jobs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 9eab66d..9d7f8d7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -38,8 +38,8 @@ COPY app ./app
COPY tsconfig.json ./
RUN apt-get update && apt-get install -y cron && rm -rf /var/lib/apt/lists/*
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' \
+ '0 */6 * * * root cd /app && DB_PATH=/app/data/events.db /usr/local/bin/node --import tsx/esm scripts/scrape.ts >> /app/data/scraper.log 2>&1' \
+ '0 23 * * * root cd /app && DB_PATH=/app/data/events.db /usr/local/bin/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