latest changes
This commit is contained in:
+30
-4
@@ -29,13 +29,39 @@ Create or reset the public demonstration account and its dummy data with:
|
||||
/home/jorenmartijn/django/tasksnest/bin/python /home/jorenmartijn/django/main/manage.py seed_demo
|
||||
```
|
||||
|
||||
The command resets only the `demo` account (default password: `demo`). It creates
|
||||
The command resets only an account marked as a demo by `planner.UserSettings.is_demo`
|
||||
(the migration marks the existing non-staff `demo` account once). It refuses to
|
||||
reset an unmarked or privileged existing account. Existing credentials are
|
||||
preserved unless `TASKNEST_DEMO_PASSWORD` or `--password` is supplied; creating
|
||||
a new demo account requires one of these. It creates
|
||||
sample parent/subtasks, workouts, pain, sleep, bowel, tooth-brushing and water
|
||||
check-ins, a 16-hour fasting schedule, and a food diary with nutrition goals,
|
||||
six local foods, favourites, custom portions, and entries across several days.
|
||||
six local foods, favourites, custom portions, a sample stress check-in and dream,
|
||||
and entries across several days.
|
||||
Food seeding makes no external API requests. It is idempotent: running it again
|
||||
removes demo-only edits and restores the same baseline. Use `--username` and
|
||||
`--password` to override the credentials.
|
||||
`--password` to rotate the credential explicitly. Do not put a password in a
|
||||
systemd command line or committed file.
|
||||
|
||||
The reset also removes demo-owned dreams, stress entries, draft recipes,
|
||||
inventory, tokens, OAuth grants, uploaded food/draft-recipe images, and active
|
||||
Django sessions. Published demo recipes are curated Recipe Match catalogue data:
|
||||
the reset preserves them and demo visitors cannot change them through recipe
|
||||
write routes.
|
||||
It keeps the demo account and its marker. Demo HTTP requests cannot issue tokens,
|
||||
authorize OAuth clients, send ntfy tests, use external product lookups, or upload
|
||||
recipe images. Demo writes are limited to 1 MiB, 60 requests per minute, and
|
||||
500 requests per day per application cache instance.
|
||||
All visitors currently share one demo account and can see each other's edits
|
||||
until the reset; do not use the demo for private information. A future isolated
|
||||
visitor session design should address that privacy limitation.
|
||||
|
||||
Before deploying, provision a unique `DJANGO_SECRET_KEY` of at least 50 random
|
||||
characters in the process environment or the ignored repository-root `.env`, and
|
||||
set `DJANGO_DEBUG=false`. The code refuses to start without the secret. Rotating
|
||||
the old public development secret invalidates existing signed sessions. Run
|
||||
`manage.py check --deploy` with the deployment environment and resolve any
|
||||
remaining warnings before exposing the service. Do not commit `.env`.
|
||||
|
||||
A daily systemd timer template is provided in `main/deploy/systemd/`. Adjust the
|
||||
`User`, `WorkingDirectory`, and `ExecStart` paths in the service file if needed,
|
||||
@@ -49,7 +75,7 @@ sudo systemctl enable --now tasknest-demo-seed.timer
|
||||
systemctl list-timers tasknest-demo-seed.timer
|
||||
```
|
||||
|
||||
The supplied timer runs daily at 03:15 Europe/Amsterdam and catches up after a
|
||||
The supplied timer runs daily at 00:00 Europe/Amsterdam and catches up after a
|
||||
missed scheduled run when the host comes back online.
|
||||
|
||||
## Fasting phase notifications
|
||||
|
||||
Reference in New Issue
Block a user