mirror of
https://github.com/luxfi/treasury.git
synced 2026-10-30 15:15:00 +00:00
- pkg/ledger: Store interface + PgStore (pgx, NUMERIC amounts) + MemStore
Atomic multi-posting transactions, idempotency via reference,
revert support, multi-ledger tenant isolation, immutable moves
with post-commit volumes for balance computation (11 tests)
- pkg/wallet: Virtual wallets backed by ledger sub-accounts
Credit/debit, hold/confirm/void mechanics using
wallets:{id}:hold:{hold_id} pattern (7 tests)
- pkg/reconciliation: Auto-matching engine
Compare ledger balances vs provider balances,
compute drift per asset, policy-based (4 tests)
- compose.yml: hanzoai/sql + hanzoai/kv (not upstream images)
44 lines
928 B
YAML
44 lines
928 B
YAML
services:
|
|
sql:
|
|
image: ghcr.io/hanzoai/sql:latest
|
|
container_name: treasury-sql
|
|
ports:
|
|
- "5433:5432"
|
|
environment:
|
|
POSTGRES_USER: treasury
|
|
POSTGRES_PASSWORD: treasury
|
|
POSTGRES_DB: treasury
|
|
volumes:
|
|
- sql-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U treasury"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
kv:
|
|
image: ghcr.io/hanzoai/kv:latest
|
|
container_name: treasury-kv
|
|
ports:
|
|
- "6380:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
treasuryd:
|
|
build: .
|
|
container_name: treasuryd
|
|
ports:
|
|
- "8091:8091"
|
|
environment:
|
|
TREASURY_LISTEN: ":8091"
|
|
DATABASE_URL: postgres://treasury:treasury@sql:5432/treasury?sslmode=disable
|
|
depends_on:
|
|
sql:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
sql-data:
|