updated make docs

This commit is contained in:
2026-09-30 09:53:32 -03:00
parent f00055033e
commit 85276d34c3
5 changed files with 61 additions and 7 deletions

View File

@@ -74,6 +74,36 @@ follow the overlay folder's name, sanitised the same way a rig folder's name is.
One rig can therefore serve several overlays, each in its own cluster, and a
project that carries rig at `./rig` does not name every cluster `rig`.
That is the default. The convention is to pin the name in the overlay's `rig.env`:
```
CLUSTER=<name>
```
The name only has to be unique on the machine: the port block derives from it, so two
overlays with the same name share one cluster and one set of ports. Pinned, it no longer
follows the folder, so moving or renaming folders changes nothing. A second copy of the
same project (another worktree, say) runs beside it by setting its own `CLUSTER=` in the
project's ignored `.env.local`: the caller beats `rig.env`. Ports the workload forwards
itself (a Tiltfile's `port_forwards`) are the overlay's, not the block's, and can still
collide.
A repository that runs on rig keeps it in a `devenv/` folder, with rig as the project's
sibling:
```
devenv/
rig/ rig
<project>/ the forwarder (RIG_DIR ?= $(HERE)/../rig), its knobs, its data
overlay/ what rig reads
```
The overlay folder is then called `overlay/` in every project, so its name says nothing
and `CLUSTER=` in its `rig.env` is required, not optional: left to the default, every such
project would be the cluster `overlay`, on the same ports. The project folder, the cluster
and the workload's namespace are three names: a folder may hold `_`, the other two are DNS
labels.
`ports.sh persist` refuses while an overlay is set: it writes to rig's
`ctrl/.env`, and a pin there would follow every overlay.
@@ -164,6 +194,9 @@ RIG_DIR ?= $(HERE)/rig
override RIG_DIR := $(abspath $(patsubst ~/%,$(HOME)/%,$(RIG_DIR)))
```
`make docs` should serve the project's pages, not rig's: the forwarder names them with
`DOCS_DIR := $(HERE)/docs` (see docs.md). rig's own stay `make -C <rig> docs`.
No search path: an unset `RIG_DIR` means `./rig`, and nothing else is tried. Moving rig
changes nothing in the cluster's name, context or ports; moving or renaming the overlay
folder does.