Repository navigation
feat(selvage): add a staging instance on twill - #102
Merged
Merged
Conversation
jaspermayone
added a commit
that referenced
this pull request
Nov 13, 2026
* origin/main: feat(krater): blue/green portal deploys, on for staging (#104) feat(krater): pull CI's image instead of building on weft (#103) feat(ansible): run ad converge build from ad.yml (#105) feat(selvage): add a staging instance on twill (#102) feat(selvage): pass the admin web ui paths through nginx on twill (#100)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Selvage staging instance on twill, in the same way as Quilt staging on batting. See the README section "Selvage staging".
modules/selvage: anmkInstancefunction and astagingoption. Unitsselvage-staging-webandselvage-staging-worker, port 3010,RAILS_ENV=staging, its own env file. Each staging container is capped at 512 MB with no swap, and has--oom-score-adj 500, so the kernel kills staging first when twill runs out of memory.hosts/twill: staging on, weave staging issuer, theselvage-stagingnginx vhost, one shared list of locations for production and staging,enableReloadso a vhost change reloads nginx in place of a restart, and ahementry in/etc/hosts.hosts/alastor/edge.nix: routerselvage-staging-twill.secrets/secrets.nix:selvage-staging-env.ageandrestricted-staging-selvage.age. No.agefile is added.bin/new-selvage-staging-secrets: reads onlySTAGING_-prefixed values, so production values left in the shell cannot reach staging.Production
The production units do not change. I compared the
ExecStartofselvage-webandselvage-workeronmainand on this branch: they are the same. The production vhost locations evaluate to the same JSON.nginx.servicechanges (the staging vhost andenableReload). twill is not built yet, so a merge changes only alastor (the new router) on a running host.Checks
nix flake check --no-build --all-systems: all checks passed.nix fmt -- --cion the changed files: no changes.shellcheckon the new script: passes. The script was also tested with throwaway age keys.