From 9e91e274e8c91724ba4a982dc30f7ae74e236052 Mon Sep 17 00:00:00 2001 From: Trey t Date: Sat, 29 Nov 2025 14:01:41 -0600 Subject: [PATCH] Add worker environment variables to Dokku setup guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add TASK_REMINDER_HOUR, TASK_REMINDER_MINUTE, OVERDUE_REMINDER_HOUR, DAILY_DIGEST_HOUR config - Document schedule times in UTC with explanation table - Add worker verification steps to check logs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docs/DOKKU_SETUP.md | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/docs/DOKKU_SETUP.md b/docs/DOKKU_SETUP.md index f14808b..4ed4f75 100644 --- a/docs/DOKKU_SETUP.md +++ b/docs/DOKKU_SETUP.md @@ -342,18 +342,26 @@ dokku letsencrypt:cron-job --add ## Set Up Worker Process -The worker process handles background jobs (task reminders, email sending, etc.). +The worker process handles background jobs (task reminders, overdue alerts, daily digests, email sending, etc.). -### 1. Create Procfile (if not exists) - -The Dockerfile already handles this, but if you need a Procfile: +### 1. Configure Worker Environment Variables ```bash -# In your local repo, create Procfile: -echo "web: /app/api" > Procfile -echo "worker: /app/worker" >> Procfile +dokku config:set casera-api \ + TASK_REMINDER_HOUR=20 \ + TASK_REMINDER_MINUTE=0 \ + OVERDUE_REMINDER_HOUR=9 \ + DAILY_DIGEST_HOUR=11 ``` +**Schedule times are in UTC:** +| Variable | Default | Description | +|----------|---------|-------------| +| `TASK_REMINDER_HOUR` | 20 | Hour to send "task due soon" notifications (8 PM UTC) | +| `TASK_REMINDER_MINUTE` | 0 | Minute for task reminder | +| `OVERDUE_REMINDER_HOUR` | 9 | Hour to send overdue task alerts (9 AM UTC) | +| `DAILY_DIGEST_HOUR` | 11 | Hour to send daily summary (11 AM UTC) | + ### 2. Scale Worker Process ```bash @@ -364,6 +372,19 @@ dokku ps:scale casera-api worker=1 dokku ps:report casera-api ``` +### 3. Verify Worker is Running + +```bash +# Check worker logs +dokku logs casera-api -p worker + +# Should see: +# "Registered task reminder job" +# "Registered overdue reminder job" +# "Registered daily digest job" +# "Starting worker server..." +``` + --- #### 7. Set Proxy Port