feat(compose): isolate mock-bank on a separate external network#20
Merged
Conversation
Treat mock-bank as an external bank by moving it onto a dedicated `external` Docker network, isolating it from the internal datastores (db/redis/rabbitmq/mongo). `app` and `prometheus` are multi-homed (default + external) so the withdrawal callback flow and metric scraping still work across the boundary. Document the topology in the root CLAUDE.md. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
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
Treat mock-bank as an external bank by moving it onto a dedicated
externalDocker network, isolating it from the internal datastores while keeping the withdrawal callback flow and metric scraping intact.🎯 Motivation
mock-bank simulates a third-party bank, but it currently sits on the single default network alongside
db/redis/rabbitmq/mongo, so it can reach internal infrastructure it has no business touching. Segmenting it better reflects its real-world trust boundary.🔧 Changes
externalDocker network indocker-compose.yml.mock-bankontoexternalonly — isolated from the internal datastores on the default network.appandprometheus(default+external) so the withdrawal callback flow and mock-bank metric scraping still work across the boundary.CLAUDE.md.🧪 How to Test
docker compose up -d --build(creates the newwallet_system_externalnetwork).app → mock-bank → /withdraw/webhookcallback completes as before.mock-bankjob atmock-bank:8081is still UP.db/redis/rabbitmq/mongoare no longer resolvable/reachable.docker compose up -d --build) to apply the new network.8081:8081) are unaffected.docker-compose.prod.ymlstill merges cleanly (verified withdocker compose config).✅ Checklist
CLAUDE.md)docker compose configon base + prod override)srcchanges)🤖 Generated with Claude Code