Skip to content

docs(portfolio): add docker-compose example for portfolio + gateway - #2315

Open
ayushsingh82 wants to merge 1 commit into
canton-network:mainfrom
ayushsingh82:docs/1941-portfolio-docker-compose
Open

docs(portfolio): add docker-compose example for portfolio + gateway#2315
ayushsingh82 wants to merge 1 commit into
canton-network:mainfrom
ayushsingh82:docs/1941-portfolio-docker-compose

Conversation

@ayushsingh82

Copy link
Copy Markdown

Summary

Adds a docker-compose.yaml example 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/deployment and docs/dapp-building/examples/portfolio), so this composes those two together on top of a LocalNet instance started with the existing pnpm start:localnet tooling, 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-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.
  • examples/portfolio/docker/portfolio.config.json: matches the strict portfolioConfigSchema in examples/portfolio/src/lib/schemas.ts.
  • Fixed the config mount path vs. the existing docs snippet in 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.json specifically, matching where the portfolio app actually fetches its config (/config.json).
  • Linked the new compose example from docs/wallet-gateway/deployment/index.md and examples/portfolio/README.md.

Verification

  • docker compose config validates the compose file cleanly.
  • Both config JSON files were checked against their respective zod schemas by reading source directly: wallet-gateway.config.json against Config.ts's rawConfigSchema and the self_signed auth fixtures in core/wallet-auth/src/*.test.ts; portfolio.config.json against portfolioConfigSchema in examples/portfolio/src/lib/schemas.ts.
  • Not yet live-tested end-to-end against a running LocalNet — Docker daemon wasn't running and disk space was tight in the environment I built this in (LocalNet is a multi-GB multi-container download). Flagging this openly per the LocalNet ledger API port (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 live docker compose up run against a fresh LocalNet would still be good before merge.

Test plan

  • Run pnpm script:fetch:localnet && pnpm start:localnet then docker compose up from examples/portfolio/ and confirm the Portfolio UI loads at http://localhost:3333 and can talk to the Wallet Gateway at http://localhost:3030.

Fixes #1941

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]>
@ayushsingh82
ayushsingh82 requested a review from a team as a code owner August 18, 2026 20:11
@ayushsingh82

Copy link
Copy Markdown
Author

@fayi-da whenever you have a chance, would appreciate a look at this one.

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.

Add a docker compose example for portfolio app

2 participants