fix: set TZ=Europe/Bucharest in Docker + scheduler diagnostic logs
The container was running on UTC by default — the 1-5 AM window was actually 4-8 AM Romania time, missing the intended night window. - Add TZ=Europe/Bucharest + tzdata package to Dockerfile - Add startup diagnostic logs: server time, timezone, ETERRA creds check Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -37,9 +37,10 @@ FROM node:22-alpine AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV TZ=Europe/Bucharest
|
||||
|
||||
# Install system deps + create user in a single layer
|
||||
RUN apk add --no-cache gdal gdal-tools ghostscript qpdf \
|
||||
RUN apk add --no-cache gdal gdal-tools ghostscript qpdf tzdata \
|
||||
&& addgroup --system --gid 1001 nodejs \
|
||||
&& adduser --system --uid 1001 nextjs
|
||||
|
||||
|
||||
@@ -247,13 +247,20 @@ if (!g.__autoRefreshTimer) {
|
||||
}
|
||||
}, 60_000);
|
||||
|
||||
const now = new Date();
|
||||
console.log(
|
||||
`[auto-refresh] Scheduler pornit — verificare la fiecare ${CHECK_INTERVAL_MS / 60_000} min`,
|
||||
);
|
||||
console.log(
|
||||
`[auto-refresh] Server time: ${now.toLocaleString("ro-RO")} (TZ=${process.env.TZ ?? "system"}, offset=${now.getTimezoneOffset()}min)`,
|
||||
);
|
||||
console.log(
|
||||
`[auto-refresh] Weekday: ${NIGHT_START_HOUR}:00–${NIGHT_END_HOUR}:00 refresh incremental`,
|
||||
);
|
||||
console.log(
|
||||
`[auto-refresh] Weekend: Vin/Sam/Dum 23:00–04:00 deep sync municipii`,
|
||||
);
|
||||
console.log(
|
||||
`[auto-refresh] ETERRA creds: ${process.env.ETERRA_USERNAME ? "OK" : "MISSING"}`,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user