#632 - Run multiple dev compose stacks concurrently#644
Merged
Conversation
Drop fixed container_name from db, scylla, siren, grafana, client, calypso
so docker compose's project-name suffix handles uniqueness. Parameterize
host ports via ${VAR:-default} for db (5432), scylla (8000), siren (1883
and 9002), grafana (3002), client (80). Defaults match today's values so
single-stack and production behavior are byte-identical.
Pass SCYLLA_PORT into the scylla container so its listener tracks the
host binding. Update compose.scylla-dev.yml BACKEND_URL to follow
SCYLLA_HOST_PORT so its dockerized client points at its own scylla.
When STACK_OFFSET=N is set, export per-service host-port env vars shifted by N and suffix the compose project name with _oN so 'down', 'logs', and 'exec' target the right stack. Unset or 0 = byte-identical to today's single-stack behavior.
Replace 'docker rm -f odyssey-db' with 'docker compose -p odyssey_integration_test down', and run up/down under the same project so the script no longer depends on a fixed container_name.
Add a 'Running multiple dev stacks side-by-side' section to compose/README.md showing how STACK_OFFSET=N shifts ports and project names, with a concurrent client-dev + fake-data example. Note that production profiles and existing ng-serve / cargo-run workflows are unaffected. Also updates .claude/skills/run-local/SKILL.md (not tracked in this repo, lives in the shared worktrees-root .claude/) to scan ports 8000/8010/.../8090 for backend liveness and identify which stack owns the listening port via the docker project's _oN suffix.
argos.sh now only appends '_oN' to the compose project name when
STACK_OFFSET=N is set, leaving port env vars to the caller (shell,
.envrc, or an alias). The base compose files still default every port
to today's value via \${VAR:-default}, so unset = byte-identical.
README's two-stack recipe shows the inline 'env STACK_OFFSET=N
ODYSSEY_DB_PORT=... ./argos.sh ...' pattern, and notes that
'compose down' only needs STACK_OFFSET since it targets by project
name not port.
README:
- Correct the volume name (it is per-project, e.g.
odyssey_client-dev_db-data, not the stale 'argos_db-data').
- Make the teardown line in the two-stack recipe use the same $N as
the up command for copy-paste consistency.
- Add a one-line caveat that STACK_OFFSET is purely a project-name
suffix (any non-empty value, including 0, creates a separate
project), so it should not be set when running production profiles.
integration_test.sh:
- Read DATABASE_URL's port from ${ODYSSEY_DB_PORT:-5432} in both the
diesel migration and cargo test invocations. Default behavior is
unchanged; if the user has ODYSSEY_DB_PORT set (e.g. from running a
parallel stack), the DB binds and the tests connect on the same
port instead of fighting.
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.
Changes
Dev compose profiles (client-dev, scylla-dev, fake-data) can now run side-by-side via STACK_OFFSET=N. Defaults match today exactly, so single-stack and production behavior are unchanged.
This is mainly for making parallel development easier, specifically when using AI agents that share a computer.
Notes
Test Cases
Checklist
Closes #632