Skip to content

fix(experimental-deploy): make experimental deploy stack-aware - #2162

Merged
martin-helmich merged 6 commits into
masterfrom
fix/add-stack-id-experimental-deploy
Oct 30, 2026
Merged

martin-helmich merged 6 commits into
masterfrom
fix/add-stack-id-experimental-deploy

Conversation

@gandie

@gandie gandie commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Makes mw experimental deploy stack-aware, based on @mittwald/container-deploy v2, which requires explicit stacks for the registry and the application (mittwald/container-deploy#22, plus mittwald/container-deploy#26 for recovering partially set up registries).

Stack layout

  • Registry: one private registry per project, shared by all deployments, in a dedicated stack ("project registry"). If a project-registry service already exists in some other stack (e.g. the default stack, where v1 put it), it is used where it is.
  • Applications: each application runs in a stack of its own, named after the service. A service that already exists is updated in the stack it is in.
  • Stacks are looked up first by the service they contain, then by description, and created if neither matches.

The interim --stack-id, --registry-stack-id and --application-stack-id flags from earlier commits on this branch are removed again; the command determines the stacks itself.

Breaking changes to defaults

To make independent deployments in the same project possible, the following defaults change (acceptable for an experimental command):

  • --service-name defaults to the name of the current directory (lowercased, runs of other characters than letters and digits replaced by a dash), instead of app-<project-id>.
  • --image-name defaults to the service name, instead of app-image.
  • --uri-prefix defaults to the service name, instead of webapp.

Previously, all deployments in a project shared one service, image and domain unless all three flags were set. Existing deployments made with the old defaults get a new service, stack, image and domain on their next run.

Other changes

  • Bumps @mittwald/container-deploy to 2.0.1. Its setupProjectRegistry now brings the registry into the desired state from any state (missing service, ingress or registry record, mismatched credentials), and identifies the project registry by its URI instead of taking the first non-public registry.
  • The command's help text now describes the whole deployment process.
  • The service name project-registry is rejected, since it is reserved for the registry.

Related: #2173 (redeploys clear the app's volume mounts since container-deploy v2), which is not addressed here.

🤖 Generated with Claude Code

@martin-helmich
martin-helmich force-pushed the fix/add-stack-id-experimental-deploy branch from 6577006 to 96753ea Compare October 27, 2026 07:44
martin-helmich and others added 2 commits October 27, 2026 16:26
Upgrade @mittwald/container-deploy to v2. The registry is deployed into a
dedicated stack per project, and each application into its own stack named
after the service. Existing services are kept in the stack they already
live in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
martin-helmich and others added 2 commits October 28, 2026 16:20
…ntainer-deploy

Default the service name to the name of the current directory instead of
`app-<project-id>`, and default the image name and domain prefix to the
service name, so that deployments from different directories no longer
overwrite each other. Describe the whole command in its help text.

Bump @mittwald/container-deploy to 2.0.1, whose setupProjectRegistry
recovers from partially set up registries, and use its exported registry
service name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@martin-helmich

Copy link
Copy Markdown
Member

Verified by manual testing. Works, apart from mittwald/container-deploy#27 and mittwald/container-deploy#28, both of which can be fixed independently.

@martin-helmich
martin-helmich merged commit deee5cb into master Oct 30, 2026
11 checks passed
@martin-helmich
martin-helmich deleted the fix/add-stack-id-experimental-deploy branch October 30, 2026 14:30
martin-helmich added a commit that referenced this pull request Oct 30, 2026
Adds a rule to `CLAUDE.md`: commands under `src/commands/experimental/`
may change incompatibly (renamed or removed flags, changed defaults or
behaviour) without being treated as breaking changes, so commits and PR
titles for them are not marked as breaking (no `!`, no `BREAKING CHANGE`
footer).

Came up in #2162, which changes the defaults of `mw experimental
deploy`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants