Skip to content

The https devnet takes its domain as a setting, DEVNET_DOMAIN - #2

Merged
tompscanlan merged 8 commits into
mainfrom
domain-setting
Oct 17, 2026
Merged

tompscanlan merged 8 commits into
mainfrom
domain-setting

Conversation

@tompscanlan

Copy link
Copy Markdown
Contributor

What changes

The https devnet's domain is now one setting, DEVNET_DOMAIN, with devnet.test as the default. Set it in the environment or in .env and the https stack comes up under that domain: alpha.<domain>, regular.<domain>, prod.<domain>, handles at <name>.<domain>. plc.directory and <name>.devnet.internal stay as they are.

  • The PDS names, handle domains, service DIDs, mail senders, relay hosts, nginx server names, the CA's name constraints and the scripts' defaults all follow it.
  • https/nginx.conf is now https/nginx.conf.template. The nginx image fills it in at start. With the default, the output matches the old file.
  • https-ca.sh issues the new leaf beside the current one and only replaces it once it verifies.
  • data/devnet.env carries DEVNET_DOMAIN for apps.

Who sees a difference

  • The plain stack (docker-compose.yml, with the test or multi-PDS overlays) does not read the setting. It renders exactly as on main, set or unset.
  • With the default, the https stack renders the same services as main, except nginx (the template mount and two environment variables) and init (it gets the domain for its seed emails).
  • If you run the https devnet from main: after pulling, rerun scripts/https-up.sh. The old nginx container mounts the renamed file and cannot restart until it is recreated. The upgrade notes in the README say this.

Checked

  • The repo's own tests, as in CI.
  • The lab devnet rerun from this branch with the default domain. App end-to-end tests and the group host checks pass as before.
  • A second copy under another domain beside the lab: names, handles, PLC documents, the relay and an OAuth probe all under the new domain.
  • An outside review for breakage on merge. This branch fixes what it found: the multi-PDS overlay picked up the setting, https-run overwrote a few exported variables in the wrapped command, the scripts read .env differently from compose in some forms, and a README recipe hardcoded the handle domain.

The PDS names, handle domains, service DIDs, relay hosts, nginx server names, the
CA's name constraints and the scripts' defaults all come from one setting, read from
the environment or .env. Unset, the stack renders as before: every service's config
is unchanged except nginx, which now fills its config in from a template at start
(the output matches the old file), and init, which gets the domain for its seed
emails. plc.directory and <name>.devnet.internal stay as they are.

https-ca.sh issues the leaf beside the current one and replaces it only once it
checks out, so a CA made for another domain no longer leaves nginx with a leaf it
cannot vouch for. data/devnet.env carries DEVNET_DOMAIN for apps.
… on main

The plain stack (docker-compose.yml, with or without the test overlay) renders
exactly as on main again, so its users see no change and no compose version has to
read a default inside a default. The https overlay now sets the alpha's mail sender
and init's handle domain from DEVNET_DOMAIN itself.
…on main: DEVNET_DOMAIN stays the https devnet's
…lay names its PDSes

The plain multi-PDS stack shares docker-compose.multi-pds.yml with the https devnet,
so a DEVNET_DOMAIN set for https changed the plain stack's service DIDs, handle
domains and mail senders too. That file is byte-identical to main again, and the https
overlay sets the three PDSes' service DIDs, handle domains and mail sender itself.
The six-file https stack renders the same services as before, default and custom.
Sourcing https-lib.sh in https-run set ROOT_DIR, DATA_DIR, HTTPS_DIR and
DEVNET_ACCOUNTS, and where the caller had exported one of those, the wrapped command
got the devnet's value instead of its own. The command's environment is as on main.
…ust be a domain name

The scripts took only an exact DEVNET_DOMAIN= line and fell back to .env when the
variable was set but empty, so `export DEVNET_DOMAIN=...`, a trailing comment or a CRLF
gave the scripts one domain and nginx another. They now accept those forms, let a
variable set in the environment win even when empty (then devnet.test), and refuse a
value that is not a domain name, which includes a ${...} compose would expand.
…ures follow the domain

An https nginx container made before the pull still mounts https/nginx.conf, and once
the file is gone it cannot start again until https-up.sh recreates it; the upgrade
notes say so, and where an overlay's own nginx config goes now. The atmo groups e2e
recipe wrote devnet.test as the handle domain under any DEVNET_DOMAIN; it reads it
from data/devnet.env.
@tompscanlan
tompscanlan merged commit 05259ef into main Oct 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant