docs(portfolio): add docker-compose example for portfolio + gateway - #2315
Open
ayushsingh82 wants to merge 1 commit into
Open
docs(portfolio): add docker-compose example for portfolio + gateway#2315ayushsingh82 wants to merge 1 commit into
ayushsingh82 wants to merge 1 commit into
Conversation
Portfolio deployment docs previously had no full docker-compose example wiring together LocalNet, the Wallet Gateway, and the Splice Portfolio dApp. Both the Wallet Gateway and Splice Portfolio already ship official Docker images (documented in docs/wallet-gateway/ deployment and docs/dapp-building/examples/portfolio), so this wires those two together via docker-compose.yaml, on top of a LocalNet instance started with the existing pnpm start:localnet tooling. - examples/portfolio/docker-compose.yaml: wallet-gateway (v1.9.0) + portfolio (v1.9.0) services. wallet-gateway reaches LocalNet's ledger API via host.docker.internal (with a Linux extra_hosts shim); portfolio's config.json is browser-facing so it keeps localhost URLs. - examples/portfolio/docker/wallet-gateway.config.json: self-signed LocalNet auth config, adapted from the existing checked-in example at docs/dapp-building/examples/json/default-config.json. Verified the shape against Config.ts's rawConfigSchema and the self_signed auth fixtures in core/wallet-auth/src/*.test.ts by reading source directly (couldn't do a live schema parse in this environment: core-signing-store-sql transitively needs core-token-standard, which needs DAML-codegen artifacts not fetched here - pre-existing gap, unrelated to this change). - examples/portfolio/docker/portfolio.config.json: matches the strict portfolioConfigSchema in examples/portfolio/src/lib/schemas.ts exactly (verified by reading the schema directly). - Corrected the config.json mount path vs. the existing (buggy) docs snippet in docs/dapp-building/examples/portfolio/index.md, which mounts a single file over nginx's whole html root; portfolio's own README says it serves /config.json, so the mount here targets /usr/share/nginx/html/config.json specifically. - Linked the new compose example from docs/wallet-gateway/deployment/index.md and from examples/portfolio/README.md. Not yet live-tested end-to-end against a running LocalNet (Docker daemon wasn't running and disk space was tight in this environment) - validated docker-compose.yaml with `docker compose config` and both config JSON files against their respective zod schemas by reading source. Fixes canton-network#1941 Signed-off-by: ayushsingh82 <[email protected]>
Author
|
@fayi-da whenever you have a chance, would appreciate a look at this one. |
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
Adds a
docker-compose.yamlexample wiring together LocalNet, the Wallet Gateway, and the Splice Portfolio dApp, as requested in #1941.Both the Wallet Gateway and Splice Portfolio already ship official, public Docker images (documented in
docs/wallet-gateway/deploymentanddocs/dapp-building/examples/portfolio), so this composes those two together on top of a LocalNet instance started with the existingpnpm start:localnettooling, rather than duplicating that (versioned, auto-fetched) LocalNet compose stack.examples/portfolio/docker-compose.yaml:wallet-gateway(v1.9.0) +portfolio(v1.9.0) services.wallet-gatewayreaches LocalNet's ledger API viahost.docker.internal(with a Linuxextra_hostsshim);portfolio'sconfig.jsonis browser-facing so it keepslocalhostURLs.examples/portfolio/docker/wallet-gateway.config.json: self-signed LocalNet auth config, adapted from the existing checked-in example atdocs/dapp-building/examples/json/default-config.json.examples/portfolio/docker/portfolio.config.json: matches the strictportfolioConfigSchemainexamples/portfolio/src/lib/schemas.ts.docs/dapp-building/examples/portfolio/index.md(which mounts a single file over nginx's whole html root) — this mounts to/usr/share/nginx/html/config.jsonspecifically, matching where the portfolio app actually fetches its config (/config.json).docs/wallet-gateway/deployment/index.mdandexamples/portfolio/README.md.Verification
docker compose configvalidates the compose file cleanly.wallet-gateway.config.jsonagainstConfig.ts'srawConfigSchemaand theself_signedauth fixtures incore/wallet-auth/src/*.test.ts;portfolio.config.jsonagainstportfolioConfigSchemainexamples/portfolio/src/lib/schemas.ts.2975) and self-signed auth shape being taken from the repo's own existing checked-in example config, which gives me reasonable confidence, but a livedocker compose uprun against a fresh LocalNet would still be good before merge.Test plan
pnpm script:fetch:localnet && pnpm start:localnetthendocker compose upfromexamples/portfolio/and confirm the Portfolio UI loads athttp://localhost:3333and can talk to the Wallet Gateway athttp://localhost:3030.Fixes #1941