Serve the PocketBase admin at redaktion.elternbeirat-igmh.info
- eb-pocketbase joins proxynet so NPM reaches it as eb-pocketbase:8090, and drops the 8090 host port; no service publishes a port on Unraid anymore - docs/deployment.md covers the Strato CNAME, the NPM proxy host and the / -> /_/ redirect (full URL, or nginx adds its :4443 container port) - PB_URL in .env.example and the editor docs point at the subdomain Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
955e2faa3f
commit
35073273d1
5 files changed
+56
-17
No files matched your search
+41
-2
@@ -103,6 +103,45 @@ Let's Encrypt asks the Strato nameservers directly,
|
||||
so the certificate works as soon as DynDNS has updated, even while public
|
||||
resolvers still cache the old IP.
|
||||
|
||||
### Editor subdomain (redaktion.elternbeirat-igmh.info)
|
||||
|
||||
The editors reach the PocketBase admin at
|
||||
<https://redaktion.elternbeirat-igmh.info/_/>.
|
||||
|
||||
1. **Strato** → Domainverwaltung → **Subdomain anlegen** `redaktion` → its
|
||||
**DNS** → **CNAME-Record** `elternbeirat-igmh.info`. Like `www`, it follows the
|
||||
DynDNS IP on its own.
|
||||
2. `eb-pocketbase` joins `proxynet` (`compose.yaml`), so NPM reaches it by name.
|
||||
3. **NPM** proxy host:
|
||||
|
||||
| Tab | Field | Value |
|
||||
|---|---|---|
|
||||
| Details | Domain Names | `redaktion.elternbeirat-igmh.info` only |
|
||||
| | Scheme / Forward Hostname / Port | `http` / `eb-pocketbase` / `8090` |
|
||||
| | Block Common Exploits, Websockets Support | on |
|
||||
| SSL | SSL Certificate | Request a new SSL Certificate (Let's Encrypt) |
|
||||
| | Force SSL, HTTP/2 | on |
|
||||
| Advanced (gear icon) | Custom Nginx Configuration | see below |
|
||||
|
||||
PocketBase has nothing at `/`; this sends the bare subdomain to the admin:
|
||||
|
||||
```nginx
|
||||
location = / {
|
||||
return 302 https://$host/_/;
|
||||
}
|
||||
```
|
||||
|
||||
The full URL is needed: with a bare path (`return 302 /_/;`) nginx adds its
|
||||
container port and the redirect lands on `:4443`.
|
||||
|
||||
Pitfalls: no `www.redaktion…` in Domain Names — it has no DNS record, and one
|
||||
unknown name makes Let's Encrypt refuse the whole certificate. And no Custom
|
||||
Location for `/`: an empty one without a forward target breaks the subdomain.
|
||||
|
||||
> **The whole PocketBase API is public on this subdomain, not just the admin.**
|
||||
> That is fine as long as the collection API rules only allow reading; writing is
|
||||
> for superusers, who bypass the rules (`redaktion.md`).
|
||||
|
||||
---
|
||||
|
||||
## Way of working: branches, never directly on main
|
||||
@@ -166,8 +205,8 @@ and there is no stale copy left there that could be started by accident.
|
||||
`compose.yaml` is the **production** base; the workflow deploys it to Unraid as
|
||||
is. It defines
|
||||
all services. `eb-blazor` publishes no host port and joins the external network
|
||||
`proxynet`, so NPM is the only path to the web app. `eb-pocketbase` still publishes
|
||||
`8090` for the editors until they reach it through an NPM subdomain (see #9).
|
||||
`proxynet`, so NPM is the only path to the web app. `eb-pocketbase` joins
|
||||
`proxynet` too, for the editor subdomain, and publishes no host port either.
|
||||
`eb-pocketbase` keeps its data on the bind mount
|
||||
`/mnt/user/appdata/pocketbase/pb_data`, which only exists on the server.
|
||||
|
||||
|
||||
Reference in new issue
Block a user