Skip to content

Latest commit

 

History

History
88 lines (62 loc) · 2.8 KB

File metadata and controls

88 lines (62 loc) · 2.8 KB

Synchronic Web Ledger Compose Network

This repository contains materials to deploy a single ledger journal with web tooling and gateway services using Docker Compose.

Requirements

  • Docker
  • Docker Compose (currently developed on v2.26.1)

Configuration

Please set the following environmental variables to configure the notary journal.

  • SECRET (required): a string used to generate authentication credentials
  • PORT: port number to forward on the host machine (default:8192)
  • PERIOD: a nonnegative integer that determines the period of each synchronization step where period = 2 ^ PERIODICITY
  • WINDOW: the number previous unpinned historical states to persist
  • LISP_DIR: optional container path to override control.scm, standard.scm, log-chain.scm, tree.scm, configuration.scm, and ledger.scm

Gateway note:

  • ALLOW_ADMIN_ROUTES is enabled by default for the gateway service in compose/general/docker-compose.yml.

Start

$ SECRET=password PORT=80 docker compose up

Local Lisp Override

Use a second compose file to bind-mount Lisp files from another repository and override the journal startup script.

cd /code
LOCAL_LISP_PATH=/absolute/path/to/lisp \
SECRET=password \
PORT=8192 \
docker compose \
  -f compose/general/docker-compose.yml \
  -f tests/docker-compose.local.yml \
  up

LOCAL_LISP_PATH must contain:

  • control.scm
  • standard.scm
  • log-chain.scm
  • tree.scm
  • configuration.scm
  • ledger.scm

Then open:

  • http://localhost:8192/explorer/
  • http://localhost:8192/workbench/
  • http://localhost:8192/gateway/
  • http://localhost:8192/api/v1/docs

Interactive Local Run (No Automated Tests)

From repository root:

# Default remote/baked Lisp behavior
./tests/up-compose.sh

# Use local Lisp files from another repo
LOCAL_LISP_PATH=/absolute/path/to/lisp ./tests/up-compose.sh

The script runs docker compose up in the foreground. Press Ctrl+C to stop and exit; it will tear the stack down so nothing keeps running. gateway uses the compose image (ghcr.io/sandialabs/sync-services/gateway:<version>). explorer and workbench use compose defaults unless LOCAL_LISP_PATH is set (which enables local UI overrides).

Programmatic Smoke Test

From repository root:

# Remote/baked Lisp content
./tests/smoke-compose.sh

# Local Lisp override from another repo
LOCAL_LISP_PATH=/absolute/path/to/lisp ./tests/smoke-compose.sh

The script starts the compose network, waits for Explorer/Workbench/Gateway docs, checks journal and gateway API responses, and tears everything down automatically. gateway uses the compose image (ghcr.io/sandialabs/sync-services/gateway:<version>). explorer and workbench use compose defaults unless LOCAL_LISP_PATH is set (which enables local UI overrides).

End

$ docker compose down -v