Add cron container and per-household timezone for auto-reminders
CI / test-and-package (push) Successful in 36s
CI / test-and-package (push) Successful in 36s
- docker-compose.yml: meal-cron service loops send_reminders_cron.py every 60s - send_reminders_cron.py: checks each household's local time, sends ntfy reminders at 10:00 (lunch) and 16:00 (dinner), guarded against duplicates - models.py: timezone, last_lunch_reminder, last_dinner_reminder on households - meals.py: /admin/timezone route for admins to set household timezone - dashboard: timezone selector (20 common zones) in Account Settings - i18n: 5 new translation keys for timezone strings - Dockerfile: copy send_reminders_cron.py - tests: 4 new timezone tests (admin set, non-admin denied, default UTC, auth) - docs: updated AGENTS.md
This commit is contained in:
@@ -14,6 +14,20 @@ services:
|
||||
networks:
|
||||
- caddy
|
||||
|
||||
meal-cron:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
command: ["sh", "-c", "while true; do python3 /app/send_reminders_cron.py; sleep 60; done"]
|
||||
volumes:
|
||||
- meal-data:/data
|
||||
environment:
|
||||
- SECRET_KEY=${SECRET_KEY:-change-me-in-production}
|
||||
- APP_BASE_URL=${APP_BASE_URL:-http://meal-tracker:5000}
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- caddy
|
||||
|
||||
volumes:
|
||||
meal-data:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user