Files
bank/compose.yml
zeekayandHanzo Dev 38faadd9f4 deploy: self-host stack in compose.yml, and let e2e smoke-test a deployment
compose.yml is now the deployment descriptor: the two published images wired
together, bankd unpublished behind the compose network with its SQLite on a
named volume (command --dir /data, since a compiled bankd otherwise keeps its
database beside the executable), the dash the only exposed port. Images come
from CI; local development still runs from source.

The e2e suite can now target a running deployment — DASH_URL=http://host:3000
pnpm test:e2e — and skips booting its own servers when it does. Two specs were
only passing because everything was local: the earn ledger check hit
127.0.0.1:8070 directly (now goes through the app's own origin), and the wallet
copy check assumed the Clipboard API, which only exists in a secure context
(now asserts the address is in the field when it can't read the clipboard).

Verified: 34/34 against the deployed stack.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-24 09:08:38 -07:00

34 lines
1.0 KiB
YAML

# Self-hosted deployment: the two published images, wired together.
#
# docker compose pull && docker compose up -d
#
# bankd keeps its SQLite in the named volume and is never published to the host —
# the dash serves the SPA and proxies /v1 to it over the compose network, so the
# stack exposes exactly one port and needs no nginx or caddy in front of it.
# Images are built by CI and pulled here; local development runs from source
# instead (see LLM.md, Running).
services:
bankd:
image: ghcr.io/luxfi/bank:${TAG:-main}
# The data dir is explicit: a compiled bankd otherwise keeps its database
# beside the executable, which a volume mount would not cover.
command: ["--dir", "/data"]
environment:
BANK_SANDBOX: "${BANK_SANDBOX:-true}"
volumes:
- bank-data:/data
restart: unless-stopped
dash:
image: ghcr.io/luxfi/bank-dash:${TAG:-main}
environment:
BANK_UPSTREAM: http://bankd:8070
ports:
- "${PORT:-3000}:3000"
depends_on:
- bankd
restart: unless-stopped
volumes:
bank-data: