Move server-wide docs to the Infrastructure repo
- docs/unraid-infrastructure.md goes; host, network pattern, NPM, monitoring and the other containers now live in Tom/Infrastructure, referenced by its Gitea URL instead of a local path - deployment.md stays self-contained: new prerequisite for proxynet and NPM, dig by IP (AdGuard blocks rzone.de), no docker login needed on Unraid, drops the finished Compose Manager switch and the generic NPM/runner pitfalls - architektur.md AE-5 reflects the deploy from the repo and the Gitea secret - entwicklung.md lists all three services of compose.yaml - CLAUDE.md drops the obsolete YamlDotNet note (#50) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4672227cf3
commit
24c787fb58
6 files changed
+57
-134
No files matched your search
+47
-33
@@ -19,6 +19,27 @@ overlays layered on top.
|
||||
|
||||
## Prerequisites (one-time)
|
||||
|
||||
> Everything needed to deploy is in this repo. Background on the server as a
|
||||
> whole (other containers, the network pattern, NPM) is in the Infrastructure
|
||||
> repo, <https://gitea.anticarnist.de/Tom/Infrastructure> — helpful, not required.
|
||||
|
||||
### Server: `proxynet` and NPM
|
||||
|
||||
The deploy expects two things on Unraid that the stack does not create itself:
|
||||
|
||||
1. The external Docker network `proxynet`, created once in the Unraid terminal:
|
||||
|
||||
```bash
|
||||
docker network create proxynet
|
||||
```
|
||||
|
||||
It survives Docker restarts only with **Settings → Docker → Advanced View →
|
||||
Preserve user defined networks: Yes**; otherwise `compose up` fails with
|
||||
"network proxynet not found".
|
||||
2. Nginx Proxy Manager attached to it (its container: **Network Type → Custom:
|
||||
proxynet**), so it reaches `eb-blazor` and `eb-pocketbase` by name. The proxy
|
||||
hosts themselves are below ("NPM proxy host", "Editor subdomain").
|
||||
|
||||
### Gitea registry token
|
||||
|
||||
The push to the registry needs a Gitea access token with **package write
|
||||
@@ -34,7 +55,10 @@ permission** (`package: Read and Write`) — **not** the account password.
|
||||
> generate a new one. A `package` token allows uploading arbitrary images to the
|
||||
> registry.
|
||||
|
||||
The Docker login then stores the token locally, so it only has to be entered once.
|
||||
The token goes into the repo secret `REGISTRY_TOKEN` (see "Automation"); the deploy
|
||||
logs in with it on every run, so Unraid needs no `docker login` of its own. Only
|
||||
the fallback `scripts/release.sh` needs a one-time `docker login
|
||||
gitea.anticarnist.de` on the machine it runs on.
|
||||
|
||||
### DynDNS for elternbeirat-igmh.info (Strato)
|
||||
|
||||
@@ -64,9 +88,12 @@ DynDNS password.
|
||||
right away; public resolvers follow once their cache expires.
|
||||
|
||||
```bash
|
||||
dig +short @docks05.rzone.de elternbeirat-igmh.info
|
||||
dig +short @217.160.80.132 elternbeirat-igmh.info
|
||||
```
|
||||
|
||||
`217.160.80.132` is `docks05.rzone.de`; the name itself does not resolve in the
|
||||
LAN because AdGuard blocks `rzone.de` (Infrastructure repo, `docs/lan.md`).
|
||||
|
||||
**Testing the credentials without the container** — passing the IP the record
|
||||
already has, so a successful login changes nothing (`nochg`); `badauth` means
|
||||
domain or password are wrong:
|
||||
@@ -98,7 +125,8 @@ The NPM that already runs on Unraid fronts the site (why not one in the stack:
|
||||
| | HSTS Subdomains, DNS Challenge | off |
|
||||
|
||||
NPM and `eb-blazor` share the Docker network `proxynet`, so NPM reaches the app by
|
||||
container name; the app publishes no host port (`unraid-infrastructure.md`).
|
||||
container name; the app publishes no host port (Infrastructure repo,
|
||||
`docs/networks.md`).
|
||||
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.
|
||||
@@ -134,9 +162,9 @@ The editors reach the PocketBase admin at
|
||||
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.
|
||||
General NPM pitfalls hit while setting this up (an extra `www.redaktion…` in
|
||||
Domain Names, an empty custom location, the `:4443` redirect) are in the
|
||||
Infrastructure repo, `docs/proxy.md`.
|
||||
|
||||
> **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
|
||||
@@ -183,33 +211,23 @@ Pushes that only touch `docs/` or Markdown files trigger nothing. A manual run
|
||||
`scripts/release.sh` still builds and pushes by hand from `main`, as a fallback
|
||||
when the runner is down. It does not deploy.
|
||||
|
||||
### One-time switch from the Compose Manager
|
||||
|
||||
Before the workflow took over, the stack was a Compose Manager stack
|
||||
(`elternbeirat`) with a pasted copy of `compose.yaml`. The workflow runs the stack
|
||||
as project `eb-stack`; the fixed `container_name`s would clash with the old
|
||||
containers, so the old stack goes first:
|
||||
|
||||
1. Add the secrets in Gitea (see "Automation" below).
|
||||
2. Compose Manager → stack `elternbeirat` → **Compose Down**, then delete the
|
||||
stack. `pb_data` is a bind mount and stays.
|
||||
3. Run the workflow by hand. The site is down from step 2 until it finishes.
|
||||
|
||||
From then on, a click on **Compose Up** in the Compose Manager is never needed —
|
||||
and there is no stale copy left there that could be started by accident.
|
||||
|
||||
---
|
||||
|
||||
## The compose files
|
||||
|
||||
`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` joins
|
||||
`proxynet` too, for the editor subdomain, and publishes no host port either.
|
||||
`eb-pocketbase` keeps its data on the bind mount
|
||||
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` 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.
|
||||
|
||||
The stack's own network has the fixed name `eb-internal`. Changing a network name
|
||||
needs `docker compose down` and then `up`; a plain `up` fails because the existing
|
||||
containers still point at the old network. `proxynet`, the network pattern and NPM
|
||||
itself are server-wide and documented in the Infrastructure repo
|
||||
(<https://gitea.anticarnist.de/Tom/Infrastructure>, `docs/networks.md`, `docs/proxy.md`).
|
||||
|
||||
The two overlays (`compose.dev.yaml`, `compose.test.yaml`) are for local
|
||||
development and the tests and are **not** used on Unraid — see `entwicklung.md`.
|
||||
|
||||
@@ -272,10 +290,6 @@ Requires three repository secrets (Gitea → repo → **Settings** → **Actions
|
||||
login password.
|
||||
- `STRATO_DYNDNS_PASSWORD` — the DynDNS password for `eb-ddns` (see above).
|
||||
|
||||
Still open: the workflow does not run the tests yet, and a failed health gate
|
||||
does not roll back on its own.
|
||||
|
||||
Two known pitfalls: the `act_runner` needs Docker socket access to build, and it
|
||||
must offer the `ubuntu-latest` label the workflow asks for. To check the runner:
|
||||
Gitea → repo (or site admin) → **Settings** → **Actions** → **Runners** — it
|
||||
should be listed as **online** with a label set that includes `ubuntu-latest`.
|
||||
A failed health gate does not roll back on its own; that stays a deliberate step
|
||||
(see "Rollback"). The runner itself (Docker socket, `ubuntu-latest` label) is
|
||||
server-wide: Infrastructure repo, `docs/apps/gitea.md`.
|
||||
Reference in new issue
Block a user