/previz: password protect, add PDF export of the crowd previz
Deploy / deploy (push) Successful in 1m5s
Deploy / deploy (push) Successful in 1m5s
- nginx basic auth on /previz/ (login file lives on the server, mounted from docker/auth/, see DEPLOY.md step 8); private, no-store so Cloudflare never caches it - Print styles for previz pages: dark, A4 landscape, one section a page; videos print as poster frames with a link - scripts/previz-pdf.mjs (npm run previz:pdf) prints the page to public/previz/crowd/crowd-previz.pdf via Edge/Chrome DevTools - "PDF" download link on the page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -112,6 +112,22 @@ The workflow is already in the repo (`.gitea/workflows/deploy.yml`). In Gitea, o
|
||||
Test it: push any commit to `main` and watch **Actions** in the repo. The job should run
|
||||
`git pull` and `docker compose up -d --build`, then the site updates.
|
||||
|
||||
### 8. Password for /previz/
|
||||
|
||||
Client previz pages under `/previz/` need a login (HTTP basic auth in `docker/nginx.conf`).
|
||||
The password file stays on the server and is never committed. Create it once:
|
||||
|
||||
```bash
|
||||
cd /opt/ttvfx_web
|
||||
mkdir -p docker/auth
|
||||
printf "production:$(openssl passwd -apr1)\n" > docker/auth/previz.htpasswd # prompts for the password
|
||||
docker compose up -d --force-recreate
|
||||
```
|
||||
|
||||
`production` is the username. To change the password, run the `printf` line again. nginx reads
|
||||
the file on every request, so no restart is needed. To add a second login, append another line
|
||||
with `>>`. If the file is missing, `/previz/` returns a 500 error, so it is never left open.
|
||||
|
||||
---
|
||||
|
||||
## Day to day
|
||||
|
||||
Reference in New Issue
Block a user