feat: run multiple deployments per machine via name and port_offset - #24
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds first-class support for running multiple deployments on the same machine by introducing a per-deployment compose project name and host-port offsetting, and updates compose invocation accordingly.
Changes:
- Embed the compose project name (
name:) into the rendered compose file and dropdocker compose -p ...usage. - Add
Deployment.nameandDeployment.port_offset, validate them, and apply port shifting to published host ports. - Extend tests and docs to cover rpcauth redaction and multi-deployment behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/docker.rs | Removes -p project flag and relies on compose file name: scoping; updates related tests. |
| src/logs/export.rs | Adds a regression test to redact both $ and $$ rpcauth spellings. |
| src/config/render.rs | Embeds compose project name; prefixes container names for named deployments; shifts published host ports; adds tests. |
| src/config/mod.rs | Introduces name and port_offset fields, validation, and helper methods (project(), published()). |
| src/config/check.rs | Updates connectivity checks to probe shifted ports for enabled (managed) services. |
| README.md | Documents docker network isolation and explains how to run multiple deployments using name + port_offset. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Related to #9
One machine can now host several deployments side by side. Two new top-level
stacks.tomlfields:name— deployment identitytestnet-b-stacks-node,testnet-b-postgres); networks come along free (testnet-b_core, ...). Validated to 1–32 lowercase letters/digits/dashes.name:key instead of threading-pthrough every call site — so everystacksupcommand (includingchainstate wipe, which doesn't load config) and even a baredocker compose -frun is scoped to the deployment whose directory you're in."stacks"keeps the historical project and container names byte-identical: existing deployments survive the upgrade with their running containers intact.port_offset— host port separationpostgres:5432in-network).config checkprobes follow the offset for enabled services and use configured ports as-is for external ones.Also included
bitcoin rpc fix(first commit): PR feat: split compose into bitcoin/core/services networks #23 review follow-ups — narrowed README isolation claim and a test that log redaction scrubs both rpcauth spellings.