Give finished Rules a print path, folded launch counts, and a two-day follow-up.
Export is PDF, RULE.md, and Print on US Letter, with every shared term, no member names, and a takeaway that points at Ask an organizer. Finished Rules keep type and place so the team can read folded counts without a database, Umami can sit beside the app with no cookies, and the person who holds the pen gets working PDF and RULE.md links 48 hours later.
This commit is contained in:
1 parent
0efc907633
commit
d9c475a967
74 files changed
+2401
-630
No files matched your search
@@ -85,6 +85,10 @@ per-app in the manifest and provisioned at install time.
|
||||
(`start.sh` chowns `/app/data` for the `node` user). When unset, upload
|
||||
routes return `server_misconfigured`. See [CONTRIBUTING.md](../../CONTRIBUTING.md)
|
||||
API table.
|
||||
- `NEXT_PUBLIC_UMAMI_SRC` / `NEXT_PUBLIC_UMAMI_WEBSITE_ID` — optional
|
||||
Umami tracker. Unset until the companion Umami app is installed.
|
||||
Cookie-free mode is set on Umami, not here. See
|
||||
[ops-runbook.md](ops-runbook.md) §9.3.
|
||||
|
||||
## 4. Platform settings
|
||||
|
||||
|
||||
@@ -248,6 +248,9 @@ persist across image updates unless changed:
|
||||
| `UPLOAD_ROOT` | `/app/data/uploads` on Cloudron — required for file uploads. |
|
||||
| `OPS_PRUNE_TOKEN` | Bearer token for `POST /api/ops/prune`. Unset hides the route. Optional; the daily scheduler runs the prune inside the container without it. |
|
||||
| `WORKSHOP_INQUIRY_PURGE_TOKEN` | Bearer token for `POST /api/workshop-inquiries/purge`. Unset hides that route. |
|
||||
| `RULE_ADMIN_EMAILS` | Named admins. Comma-separated. Can open private Rules and `/rule-counts`. |
|
||||
| `NEXT_PUBLIC_UMAMI_SRC` | Umami script URL. Unset: no tracker. Pair with `NEXT_PUBLIC_UMAMI_WEBSITE_ID`. |
|
||||
| `NEXT_PUBLIC_UMAMI_WEBSITE_ID` | Umami website id for this hostname. |
|
||||
|
||||
Full detail: [`ops-backend-deploy.md` §3](ops-backend-deploy.md#3-environment-variables).
|
||||
|
||||
@@ -320,6 +323,27 @@ node --env-file=.env --import tsx scripts/prune-sessions.ts
|
||||
If the scheduler addon is missing after an image update, add the same
|
||||
command under the app **Cron** tab (`20 7 * * *`, UTC).
|
||||
|
||||
The same scheduler addon also runs **`follow-up-mail`** at **15 minutes
|
||||
past every hour**. It sends one print follow-up to the address that holds
|
||||
the pen, 48 hours after the Rule was finished, with PDF and RULE.md
|
||||
links. Guest Rules with no account are skipped until claimed, and only
|
||||
Rules finished in the last seven days are considered so a first run after
|
||||
deploy does not mail every historic Rule.
|
||||
|
||||
Manual run:
|
||||
|
||||
```bash
|
||||
cloudron exec --app staging.communityrule.info -- \
|
||||
node /app/follow-up-mail.bundle.cjs
|
||||
|
||||
# local
|
||||
node --env-file=.env --import tsx scripts/send-rule-follow-up.ts
|
||||
```
|
||||
|
||||
Named admins can read finished-Rule counts (folded under five) at
|
||||
`/rule-counts`, or `GET /api/ops/rule-counts` with the same session or
|
||||
`Authorization: Bearer $OPS_PRUNE_TOKEN`.
|
||||
|
||||
### 9.2 Logs
|
||||
|
||||
App logs (stdout) and Cloudron request logs are deleted after **14
|
||||
@@ -336,7 +360,28 @@ host for longer than 14 days.
|
||||
|
||||
Sign-in mail failures log a request id, not the email address.
|
||||
|
||||
### 9.3 Backups
|
||||
### 9.3 Umami (site counts)
|
||||
|
||||
Umami is a **second Cloudron app**, not this image. Install the Umami
|
||||
Cloudron package (or Docker) on a hostname such as
|
||||
`analytics.communityrule.info`. Create a website for this app’s public
|
||||
origin. In Umami → website settings, **turn off cookies** (tracker
|
||||
collects aggregate page views only).
|
||||
|
||||
Then on this CommunityRule app:
|
||||
|
||||
```bash
|
||||
cloudron env set --app staging.communityrule.info \
|
||||
NEXT_PUBLIC_UMAMI_SRC=https://analytics.communityrule.info/script.js
|
||||
cloudron env set --app staging.communityrule.info \
|
||||
NEXT_PUBLIC_UMAMI_WEBSITE_ID=<website-id>
|
||||
```
|
||||
|
||||
Unset both to ship no tracker. The snippet sets `data-do-not-track` and
|
||||
`data-exclude-search` so query strings (share and export tokens) are not
|
||||
sent to Umami.
|
||||
|
||||
### 9.4 Backups
|
||||
|
||||
Set the Cloudron backup site to **`30 daily`** (*Backups* → *Schedule &
|
||||
Retention*). Confirm this on staging and production. Cloudron also keeps
|
||||
|
||||
@@ -37,8 +37,10 @@ until the 12-month delete.
|
||||
## Analytics
|
||||
|
||||
**Umami**, self-hosted beside the app, with no cookies and aggregate
|
||||
counts only. Name it in the policy. The counter itself ships with the
|
||||
counts-by-group work, not this pass.
|
||||
counts only. Name it in the policy. The app loads the tracker only when
|
||||
`NEXT_PUBLIC_UMAMI_SRC` and `NEXT_PUBLIC_UMAMI_WEBSITE_ID` are set.
|
||||
Cookie-free mode is configured on the Umami app, not in this repo.
|
||||
See [`docs/guides/ops-runbook.md`](guides/ops-runbook.md) §9.3.
|
||||
|
||||
## Product copy the build already matches
|
||||
|
||||
|
||||
Reference in new issue
Block a user