./local/up.sh (make local) boots the full /v1 backend on ~/.hanzo/bin/hanzo cloud with a self-generated dev KMS key and no external IAM — fully seedable locally (prod is IAM-only). Apps + screenshot harness point at localhost:8899. Proven: /api/health 200 with iam/kms/base/accounts/bank/commerce/o11y. Co-authored-by: Hanzo Dev <[email protected]>
22 lines
1.2 KiB
Bash
Executable File
22 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# One-command local Lux/Hanzo stack on the `hanzo cloud` everything-binary.
|
|
# Boots the full /v1 backend (iam, kms, base, accounts, bank, commerce, o11y, …)
|
|
# locally with a self-generated dev KMS key and NO external IAM — so it's
|
|
# fully seedable (unlike prod, which is IAM-only). Point the apps + the
|
|
# screenshot harness at http://localhost:${LISTEN#:}.
|
|
set -euo pipefail
|
|
HERE="$(cd "$(dirname "$0")" && pwd)"
|
|
BIN="${HANZO_BIN:-$HOME/.hanzo/bin/hanzo}"
|
|
BRAND="${BRAND:-lux}"
|
|
LISTEN="${LISTEN:-:8899}"
|
|
DATA="${DATA:-$HERE/.data/$BRAND}"
|
|
KEYFILE="$HERE/.kms-master-key"
|
|
[ -x "$BIN" ] || { echo "hanzo binary not found at $BIN (build: cd ~/work/hanzo/cloud && GOWORK=off go build -o ~/.hanzo/bin/hanzo ./cmd/hanzo)"; exit 1; }
|
|
mkdir -p "$DATA"
|
|
[ -f "$KEYFILE" ] || head -c32 /dev/urandom | base64 > "$KEYFILE" # persistent per-checkout dev KEK
|
|
export CLOUD_KMS_MASTER_KEY_REF="$(cat "$KEYFILE")" SANDBOX=1 HANZO_DEV=1
|
|
echo "▸ hanzo cloud brand=$BRAND listen=$LISTEN data=$DATA (dev KEK, no external IAM)"
|
|
echo " API: http://localhost:${LISTEN#:}"
|
|
echo " health: http://localhost:${LISTEN#:}/api/health"
|
|
exec "$BIN" cloud -brand "$BRAND" -listen "$LISTEN" -data-dir "$DATA" -iam-issuer "" -enable "${ENABLE:-}"
|