Wave 11 — the three candidates: CLI — lawsynth simplify (egraph equality saturation extracts the lowest-cost EQUIVALENT law; proves equivalence by simulating both worlds, deviation ~0; honest 'already minimal' on sparse discovered worlds); lawsynth compose (union two worlds into a coupled system, namespacing collisions) and lawsynth edit (immutable rename/set-param/drop-law/scale-law, re-validated). SDK — lawsynth.simplify / World.simplify (stdlib expand/fold/combine + equivalence verify), lawsynth.compose, World.rename/set_parameter/drop_law/ scale_law. Two runnable examples. Deploy — a verifiable hosted-deploy story: deploy/quickstart (config-validated minimal api+gateway) + docs/self-hosting/quickstart.md (real curl/Client run loop), after fixing genuine drift in the compose files (SQLite URL the API actually accepts, correct token env, object root, health endpoints, native build step) — verified end-to-end from source. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
74 lines
3.0 KiB
Plaintext
74 lines
3.0 KiB
Plaintext
# LawSynth local stack — environment template.
|
|
#
|
|
# cp .env.example .env
|
|
#
|
|
# These are LOCAL DEVELOPMENT defaults. They contain throwaway credentials that
|
|
# are safe only on a trusted developer machine. Never reuse them anywhere that
|
|
# is reachable from an untrusted network. For real deployments see
|
|
# ../production/.env.example, which forces you to supply your own secrets.
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Images
|
|
# ---------------------------------------------------------------------------
|
|
# Registry + tag for the service images. `docker compose up --build` builds
|
|
# them locally from deploy/docker/images/ using these names.
|
|
LAWSYNTH_REGISTRY=ghcr.io/lawsynth
|
|
LAWSYNTH_VERSION=0.1.0
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Logging
|
|
# ---------------------------------------------------------------------------
|
|
# One of: trace, debug, info, warn, error.
|
|
LAWSYNTH_LOG_LEVEL=debug
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Postgres (metadata database)
|
|
# ---------------------------------------------------------------------------
|
|
POSTGRES_USER=lawsynth
|
|
POSTGRES_PASSWORD=lawsynth_local_password
|
|
POSTGRES_DB=lawsynth
|
|
POSTGRES_HOST_PORT=5432
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# MinIO (S3-compatible object store)
|
|
# ---------------------------------------------------------------------------
|
|
MINIO_ROOT_USER=lawsynth
|
|
MINIO_ROOT_PASSWORD=lawsynth_local_password
|
|
MINIO_API_HOST_PORT=9000
|
|
MINIO_CONSOLE_HOST_PORT=9001
|
|
LAWSYNTH_S3_BUCKET=lawsynth-artifacts
|
|
LAWSYNTH_S3_REGION=us-east-1
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# NATS (event bus)
|
|
# ---------------------------------------------------------------------------
|
|
NATS_CLIENT_HOST_PORT=4222
|
|
NATS_MONITOR_HOST_PORT=8222
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# API + gateway
|
|
# ---------------------------------------------------------------------------
|
|
# One API worker: the domain repositories and in-process discovery/event bus
|
|
# are process-local (see services/api/README.md).
|
|
LAWSYNTH_API_HOST_PORT=8080
|
|
LAWSYNTH_API_WORKERS=1
|
|
LAWSYNTH_GATEWAY_HOST_PORT=8081
|
|
LAWSYNTH_GATEWAY_WORKERS=1
|
|
LAWSYNTH_GATEWAY_MAX_BODY_BYTES=67108864
|
|
LAWSYNTH_GATEWAY_REQUESTS_PER_WINDOW=120
|
|
LAWSYNTH_GATEWAY_RATE_WINDOW_SECONDS=60
|
|
LAWSYNTH_GATEWAY_ALLOWED_ORIGINS=http://localhost:8083
|
|
# Bearer token the API accepts. Must be at least 16 characters. The compose file
|
|
# expands it into LAWSYNTH_API_TOKENS_JSON as
|
|
# {"<token>": {"organization_id": "local", "scopes": ["read","write"]}}
|
|
# Regenerate before any shared use, e.g.: openssl rand -hex 24
|
|
LAWSYNTH_API_TOKEN=local-dev-token-change-me-please
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Artifact service + workers
|
|
# ---------------------------------------------------------------------------
|
|
LAWSYNTH_ARTIFACT_HOST_PORT=8082
|
|
LAWSYNTH_SCHEDULER_LEASE_SECONDS=60
|
|
LAWSYNTH_WORKER_MAX_CONCURRENCY=2
|
|
LAWSYNTH_WORKER_JOB_TIMEOUT_SECONDS=3600
|