From f508b7c88234c96de7c1c34d09ba58df3897d466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Mon, 26 Oct 2026 14:57:59 +0100 Subject: [PATCH] 0.2.93_css --- .env.example | 6 ++++++ README.md | 4 ++-- static/css/styles.css | 48 ++++++------------------------------------- static/home.html | 2 -- 4 files changed, 14 insertions(+), 46 deletions(-) diff --git a/.env.example b/.env.example index 8012f84..82fb3f7 100644 --- a/.env.example +++ b/.env.example @@ -1,9 +1,15 @@ # Application APP_HOST=0.0.0.0 + +# APP AND FILES_PORT, do not touch please APP_PORT=3000 +FILES_PORT=3001 # Port exposed by Docker Compose +# main app RUSTPAD_PORT=8200 +# app files +RUSTPAD_FILES_PORT=8201 # Database diff --git a/README.md b/README.md index e74608d..9373a7c 100644 --- a/README.md +++ b/README.md @@ -229,9 +229,9 @@ Stored attachment paths remain `/f/{token}/{filename}` for both backends. RustPa RustPad automatically selects one of two file-serving modes: - **Single domain** (default): leave `FILES_PUBLIC_URL` unset. `/f/{token}/{filename}` is served on `APP_PORT` (default 3000), with application-relative attachment links. `FILES_PORT` is ignored and no second listener starts. -- **Dedicated file domain**: set `FILES_PUBLIC_URL=files.note.example.com`. RustPad generates attachment links on that origin and starts a separate attachment-only router on `FILES_PORT` (default 3001, same `APP_HOST`). The application router on `APP_PORT` no longer serves `/f/...`. The file router serves `GET`/`HEAD /f/{token}/{filename}` and the health checks `GET`/`HEAD /health` and `/healthz` (both return HTTP 200 and `ok` for GET); all other paths return an empty 404 response. The original link-based file access, local/S3 storage, and stored database paths remain unchanged. +- **Dedicated file domain**: set `FILES_PUBLIC_URL=files.note.example.com`. RustPad generates attachment links on that origin and starts a separate attachment-only router on `FILES_PORT` (default 3001, same `APP_HOST`). The application router on `APP_PORT` no longer serves `/f/...`. The file router serves `GET`/`HEAD /f/{token}/{filename}` and the health checks `GET`/`HEAD /health` (both return HTTP 200 and `ok` for GET); all other paths return an empty 404 response. The original link-based file access, local/S3 storage, and stored database paths remain unchanged. -Bare domains are normalized to HTTPS; `http://` is allowed for local testing. For a dedicated origin, point its reverse proxy directly at `APP_HOST:FILES_PORT` (e.g. `rustpad:3001` from another container in the same network). There is no need for proxy path deny-lists. For monitoring, request `http://rustpad:3001/health` (or `/healthz`) from inside the network. The application origin continues to point at `APP_HOST:APP_PORT`. +Bare domains are normalized to HTTPS; `http://` is allowed for local testing. For a dedicated origin, point its reverse proxy directly at `APP_HOST:FILES_PORT` (e.g. `rustpad:3001` from another container in the same network). There is no need for proxy path deny-lists. For monitoring, request `http://rustpad:3001/health` from inside the network. The application origin continues to point at `APP_HOST:APP_PORT`. **Upgrading an existing file-subdomain deployment:** change the subdomain's proxy upstream from port 3000 to port 3001 before/when installing this release. Existing attachment URLs and database records do not change. Without the proxy change, old attachment requests will return 404 at the application port. `FILES_PORT` must be between 1 and 65535 and differ from `APP_PORT` when the separate domain is enabled. Both listeners must be reachable from their respective proxies. diff --git a/static/css/styles.css b/static/css/styles.css index 97205d1..70bf1ec 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -4482,28 +4482,12 @@ dialog::backdrop { .home-footer__account-pending { position: absolute; - inset: 0 auto 0 0; - display: flex; - align-items: center; - gap: 10px; - width: min(100%, 270px); + width: 1px; + height: 1px; + overflow: hidden; + clip-path: inset(50%); + white-space: nowrap; pointer-events: none; - opacity: 1; -} - -.home-footer__loading-line { - display: block; - height: 13px; - flex: 0 1 135px; - border-radius: 6px; - background: var(--surface-2); - box-shadow: inset 0 0 0 1px var(--border); - animation: home-account-wait 1.4s ease-in-out infinite; -} - -.home-footer__loading-line--short { - flex: 0 0 64px; - animation-delay: .15s; } .home-footer__account-slot:not([data-state=ready])>.home-footer__account { @@ -4519,18 +4503,6 @@ dialog::backdrop { animation: home-account-reveal .25s ease-out both; } -@keyframes home-account-wait { - - 0%, - to { - opacity: .45; - } - - 50% { - opacity: .85; - } -} - @keyframes home-account-reveal { 0% { opacity: 0; @@ -4544,9 +4516,7 @@ dialog::backdrop { } @media(prefers-reduced-motion:reduce) { - - .home-footer__account-slot[data-state=ready]>.home-footer__account:not([hidden]), - .home-footer__loading-line { + .home-footer__account-slot[data-state=ready]>.home-footer__account:not([hidden]) { animation: none; } } @@ -4557,12 +4527,6 @@ dialog::backdrop { min-height: 52px; justify-content: center; } - - .home-footer__account-pending { - inset: 0; - justify-content: center; - margin: auto; - } } .home-footer__account { diff --git a/static/home.html b/static/home.html index b737fff..172fbb5 100644 --- a/static/home.html +++ b/static/home.html @@ -77,8 +77,6 @@