Add Dockerfile and compose setup for self-hosting
Multi-stage build: Node builds the static PWA, nginx serves it with an SPA fallback, long-lived caching for hashed assets, no-cache for the app shell and service worker, and the correct type for the web manifest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VsorPV3JeJRoZ1mD1pdvtL
This commit is contained in:
parent
08a530c78f
commit
23d0c29e0b
5 changed files with 72 additions and 0 deletions
|
|
@ -12,6 +12,14 @@ npm run check # type-check
|
|||
npm run build # static PWA in build/ — serve it from any static host (HTTPS for PWA install)
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
```sh
|
||||
docker compose up -d --build # http://localhost:8080 (set PAPURE_PORT to change)
|
||||
```
|
||||
|
||||
The image builds the PWA and serves it with nginx. Put an HTTPS reverse proxy in front of it: installing the PWA and the offline service worker both need HTTPS. To update, `git pull` and run the same command again.
|
||||
|
||||
## Using it
|
||||
|
||||
- **Tools** (bottom bar): Text `T`, Pen `P`, Highlighter `H`, Eraser `E`, Import PDF, Undo/Redo, zoom. The pen's eraser end erases too.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue