CI / test-and-package (push) Successful in 33s
- meal-cron now runs send_reminders_cron.sh (simple wget loop, no DB mount) - New /api/cron-tick endpoint handles all timezone logic server-side - base_url captured from request.host_url when user saves ntfy settings, stored per-user — no APP_BASE_URL env var needed - Cron endpoint protected by CRON_SECRET shared env var - Removed send_reminders_cron.py, DB volume from cron container - tests: 3 new cron-tick + base_url capture tests (69 total)
11 lines
316 B
Bash
Executable File
11 lines
316 B
Bash
Executable File
#!/bin/sh
|
|
# Cron loop — calls the meal-tracker API every 60s to trigger reminders.
|
|
# The Flask endpoint handles all timezone logic and ntfy sending.
|
|
|
|
while true; do
|
|
wget -q -O- --post-data="" \
|
|
--header="X-Cron-Secret: ${CRON_SECRET}" \
|
|
http://meal-tracker:5000/api/cron-tick 2>/dev/null
|
|
sleep 60
|
|
done
|