Add worker environment variables to Dokku setup guide

- 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 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-11-29 14:01:41 -06:00
parent a15e847098
commit 9e91e274e8

View File

@@ -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