Repository navigation
fix: repair seven lifecycle and domain mode bugs - #113
Merged
Merged
Conversation
The hints were written below `[ports]`, so TOML read them as a port
named `hints`. `stack up infra` never showed them, and the runtime
built a `{infra_hints_url}` template variable from the list.
They are now a top-level key. A new test checks that every `[ports]`
entry in a shipped manifest is a port number.
`[core] https` reached the URL scheme as the string "False", which is truthy, so `https = false` made every domain-mode URL https just like `https = true`. The value is now compared with "true". Nothing else reads a boolean from stack.toml this way.
When a first `stack up` failed after compose had started containers, on a port conflict for instance, the stacklet had no setup-done marker. `stack destroy` then treated it as never set up and only deleted its data. The containers kept their names and ports, and the next `stack up` ran into them. A stacklet that is not installed but has containers now goes through the full destroy: confirmation, `docker compose down`, and the usual cleanup. Without containers, destroy still just deletes leftover data.
`stack up` printed "Failed to start services" and dropped compose's output, which holds the reason, such as a port another container already uses. The admin had to rerun compose by hand to find out. Errors now show the last lines of the tool's output below the message. This covers `stack up`, `stack down` and `stack destroy`, which all carry compose's output in the same field.
Element's homeserver URL was written into `element-config.json` once, at install. A move to domain mode, or HTTPS turned on later, left Element calling the old address. Served over https, the browser blocks calls to an http homeserver as mixed content, so nobody could log in. The `stack up messages` hint for phones named the port-mode address in every mode. `stack up messages` now sets Element's `base_url` to the Synapse URL the stack renders, leaving the rest of the file as it is, and the phone hint shows the same URL.
Stacklets with `build = true` (agent, core, infra, memory) were built without `--pull`, so the build cache kept the base image first pulled for good. Watchtower does not update locally built images, so security fixes in those bases, and newer Caddy releases for infra, never arrived. `stack up` now builds with `--pull`. An unchanged base costs a registry lookup and the cached layers are reused; a newer one triggers a rebuild. When the pull fails, offline for instance, the build runs again from the cache so the stacklet still starts.
In domain mode Forgejo's SSH port was published on the Mac's loopback
only, like every service behind the proxy, and the clone URLs Forgejo
and `stack up code` showed named the LAN IP instead of the web host.
Neither worked from another machine.
- SSH is published on every interface in both modes. It does not go
through Caddy, and it is encrypted and authenticated by itself.
- The clone URLs name the host of the web UI: `code.<domain>` in
domain mode, the Mac's address in port mode. A new template variable,
`{url_host}`, is the host of a stacklet's `{url}`.
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
Seven independent fixes, one commit each. Merge with Rebase and merge so each lands as its own changelog line.
fix(infra): show the next-step hints after stack up infrastack up infraprints its hintsfix(stack): treat https = false as plain HTTP[core] https = falseno longer produces https URLsfix(stack): remove the containers of a stacklet whose first up failedstack destroycleans up after a failed firststack upfix(stack): show why compose failed when a stacklet cannot startfix(messages): point Element and phones at the current homeserver URLfix(stack): rebuild locally built images on current base imagesfix(code): make SSH clone URLs work in domain modessh://git@code.<domain>:222/…clones work from the LANThe same seven commits as #112, which merged into
feat/domain-moderather thanmain.