docs(docs): separate public 0.1.0 from develop in README and DEPLOY
README splits the public 0.1.0, develop, DEV-only features and planned work. CHANGELOG states nothing under Unreleased is deployed. DEPLOY gets a status notice (historical, unverified, would-break, security prerequisites) and marks both CSP examples as not production-ready; fixes stay with RR-5.
This commit is contained in:
1 parent
ac60b24267
commit
d4f628f8c8
3 files changed
+127
-15
No files matched your search
@@ -1,5 +1,56 @@
|
||||
# Deploy
|
||||
|
||||
## Status of this guide (2026-10-25)
|
||||
|
||||
This guide was written for the static deployment of 0.1.0, the version
|
||||
faunosteo.com runs, and is kept as that record. It is not a procedure for
|
||||
`develop`: nothing authorises deploying it (release readiness track, TODO
|
||||
RR-1 to RR-10). The corrections this file needs are TODO RR-5.
|
||||
|
||||
Historical, true for 0.1.0 and wrong for an image with a backend: the
|
||||
introduction below ("no backend, no database"), "Data persistence",
|
||||
"Backups", "Backend CORS", "Frontend API base URL", the rollback's "no
|
||||
server-side state", and the troubleshooting entries "CORS rejected in
|
||||
browser" and "volume / data unexpectedly empty".
|
||||
|
||||
Not verified for the current code:
|
||||
|
||||
- the loopback claim: `docker-compose.yml` publishes `${PORT:-8080}` on every
|
||||
interface, and rootful Docker bypasses UFW;
|
||||
- "First-time VPS setup", "Routine deploys" and "Rollback" build the image on
|
||||
the VPS; an image from R2 on compiles the Rust core and is never built there
|
||||
(see "Image deploy by digest");
|
||||
- the fallback that serves `apps/app/dist/` from a plain `nginx:alpine` drops
|
||||
`docker/nginx.conf` (the `env.js` no-cache rule, the `.wasm.gz` served with
|
||||
`gzip_static`);
|
||||
- the VPS sizing table, written before the Rust build stages.
|
||||
|
||||
Would break the current application if applied as written:
|
||||
|
||||
- the two CSP examples (Option A nginx, Option B Caddy), marked below as not
|
||||
production-ready: without `'wasm-unsafe-eval'` the editor, the export and
|
||||
the import cannot load the Rust core; without the Supabase origin in
|
||||
`connect-src` (it falls back to `default-src 'self'`), sign-in and the
|
||||
`/app` space fail unless Supabase is served from the same origin;
|
||||
- a default build (`SHEET_BUNDLE=none`): no anatomical sheet, the editor
|
||||
refuses to create or import a report.
|
||||
|
||||
Security prerequisites before deploying anything built from `develop`:
|
||||
|
||||
- the CSP of "WebAssembly and the CSP" with `connect-src` naming the Supabase
|
||||
origin, checked on the image (`docker/csp-proof/app-image.sh`);
|
||||
- the container port bound to loopback in fact, checked from outside the VPS;
|
||||
- a hosting decision for Supabase (`docs/development/OPEN_QUESTIONS.md` Q2),
|
||||
production SMTP with French auth email templates, captcha, OAuth ids, MFA
|
||||
for platform roles (RR-3, RR-5);
|
||||
- the worker's service key out of `.env`, its exposure to the `docker` group
|
||||
settled (RR-4);
|
||||
- images built off the VPS and pulled by digest, base images pinned (RR-6);
|
||||
- the RLS and API items of RR-3 and RR-4 and the dependency advisories of
|
||||
RR-1 treated or qualified.
|
||||
|
||||
---
|
||||
|
||||
Single nginx:alpine container behind a host reverse proxy that terminates
|
||||
TLS. The container serves a static SPA bundle (built from `apps/app`, Node 24,
|
||||
pnpm 10.13.1) from `/usr/share/nginx/html`
|
||||
@@ -298,6 +349,10 @@ previous image, never a rebuild of the old engine.
|
||||
|
||||
## Data persistence
|
||||
|
||||
Historical (0.1.0, no backend): once Supabase or the worker run beside the
|
||||
application, the database and the Storage objects are server-side state that
|
||||
this section and the next do not cover.
|
||||
|
||||
There are no server-side volumes to back up:
|
||||
|
||||
- **In-flight session data** lives in the praticien's browser
|
||||
@@ -314,6 +369,10 @@ regenerated on every build.
|
||||
|
||||
## Backups (cron + retention)
|
||||
|
||||
Historical (0.1.0): the `.env` snapshot below is the whole backup only while
|
||||
the server holds no data; `docs/development/STORAGE.md` §5.2 sets the order
|
||||
for a backend (database dump first, files within 48 h).
|
||||
|
||||
Because there is no server-side state, the backup target is the source
|
||||
repository plus the `.env` file.
|
||||
|
||||
@@ -430,6 +489,11 @@ systemctl status certbot.timer # auto-renew preinstalled on Ubuntu
|
||||
|
||||
#### Security headers (Option A only)
|
||||
|
||||
Not production-ready (2026-10-25): the `Content-Security-Policy` line below is
|
||||
the 0.1.0 header. It lacks `'wasm-unsafe-eval'` and the Supabase origin in
|
||||
`connect-src`; any later image needs "WebAssembly and the CSP" below first
|
||||
(correction tracked as TODO RR-5).
|
||||
|
||||
Add inside the `listen 443` block (under any existing `location` rules
|
||||
the certbot template inserted):
|
||||
|
||||
@@ -460,6 +524,9 @@ the PDF preview emits data URLs.
|
||||
|
||||
### Option B — Caddy (auto-TLS, single file)
|
||||
|
||||
Not production-ready (2026-10-25): the `Content-Security-Policy` of this
|
||||
Caddyfile is the 0.1.0 header, with the same gaps as Option A (TODO RR-5).
|
||||
|
||||
```bash
|
||||
apt-get install -y debian-keyring debian-archive-keyring apt-transport-https
|
||||
curl -1sLf https://dl.cloudsmith.io/public/caddy/stable/gpg.key | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
|
||||
@@ -489,6 +556,9 @@ Caddy handles TLS issuance + renewal automatically.
|
||||
|
||||
### Backend CORS
|
||||
|
||||
Historical (0.1.0): since Step 7 the browser calls the Supabase API, a
|
||||
cross-origin request unless Supabase is served from the same origin.
|
||||
|
||||
N/A. The app has no backend and makes no cross-origin requests. The only
|
||||
runtime fetches target the same origin (SVG assets, `env.js`).
|
||||
|
||||
|
||||
Reference in new issue
Block a user