107 lines
4.0 KiB
Plaintext
107 lines
4.0 KiB
Plaintext
# LawSynth production stack — environment template.
|
|
#
|
|
# cp .env.example .env
|
|
# # then set EVERY value marked REQUIRED to a real, unique secret.
|
|
#
|
|
# Generate strong secrets, e.g.:
|
|
# openssl rand -base64 36
|
|
#
|
|
# Never commit .env. Never reuse the example placeholders. The stack refuses to
|
|
# start (config error) if a REQUIRED value is missing.
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Images (REQUIRED: pin the version to a released tag)
|
|
# ---------------------------------------------------------------------------
|
|
LAWSYNTH_REGISTRY=ghcr.io/lawsynth
|
|
LAWSYNTH_VERSION= # REQUIRED, e.g. 0.1.0
|
|
LAWSYNTH_LOG_LEVEL=info
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Public endpoint / TLS (REQUIRED)
|
|
# ---------------------------------------------------------------------------
|
|
LAWSYNTH_DOMAIN= # REQUIRED, e.g. lawsynth.example.com
|
|
LAWSYNTH_ACME_EMAIL= # REQUIRED, contact email for Let's Encrypt
|
|
LAWSYNTH_HTTP_PORT=80
|
|
LAWSYNTH_HTTPS_PORT=443
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Postgres (REQUIRED secrets)
|
|
# ---------------------------------------------------------------------------
|
|
POSTGRES_USER=lawsynth
|
|
POSTGRES_PASSWORD= # REQUIRED
|
|
POSTGRES_DB=lawsynth
|
|
POSTGRES_MAX_CONNECTIONS=200
|
|
POSTGRES_SHARED_BUFFERS=512MB
|
|
POSTGRES_EFFECTIVE_CACHE_SIZE=1536MB
|
|
POSTGRES_CPU_LIMIT=2
|
|
POSTGRES_MEMORY_LIMIT=2g
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Object store
|
|
# ---------------------------------------------------------------------------
|
|
# Bundled MinIO (default). For a managed S3, remove object-store.yaml from
|
|
# compose.yaml's include list and set LAWSYNTH_S3_ENDPOINT / keys below.
|
|
MINIO_ROOT_USER=lawsynth
|
|
MINIO_ROOT_PASSWORD= # REQUIRED
|
|
MINIO_BROWSER=off
|
|
LAWSYNTH_S3_BUCKET=lawsynth-artifacts
|
|
LAWSYNTH_S3_REGION=us-east-1
|
|
# Override only when using an external S3 (otherwise leave as-is):
|
|
LAWSYNTH_S3_ENDPOINT=http://object-store:9000
|
|
# LAWSYNTH_S3_ACCESS_KEY_ID= # defaults to MINIO_ROOT_USER
|
|
# LAWSYNTH_S3_SECRET_ACCESS_KEY= # defaults to MINIO_ROOT_PASSWORD
|
|
MINIO_CPU_LIMIT=2
|
|
MINIO_MEMORY_LIMIT=2g
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# NATS event bus
|
|
# ---------------------------------------------------------------------------
|
|
NATS_MAX_PAYLOAD=8MB
|
|
NATS_JS_MAX_MEMORY=256MB
|
|
NATS_JS_MAX_FILE=4GB
|
|
NATS_CPU_LIMIT=1
|
|
NATS_MEMORY_LIMIT=512m
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# API + gateway
|
|
# ---------------------------------------------------------------------------
|
|
# Bearer tokens the API accepts. Format: <token>=<org>:<scope>[,<token>=...].
|
|
# Scope is one of read | write | admin. REQUIRED.
|
|
LAWSYNTH_API_TOKENS= # REQUIRED, e.g. $(openssl rand -hex 24)=acme:admin
|
|
# Comma-separated bare origins allowed by CORS. REQUIRED.
|
|
LAWSYNTH_GATEWAY_ALLOWED_ORIGINS= # REQUIRED, e.g. https://lawsynth.example.com
|
|
|
|
LAWSYNTH_API_REPLICAS=2
|
|
LAWSYNTH_API_WORKERS=4
|
|
LAWSYNTH_API_TIMEOUT=120
|
|
LAWSYNTH_API_CPU_LIMIT=1
|
|
LAWSYNTH_API_MEMORY_LIMIT=1g
|
|
|
|
LAWSYNTH_GATEWAY_REPLICAS=2
|
|
LAWSYNTH_GATEWAY_WORKERS=4
|
|
LAWSYNTH_GATEWAY_MAX_BODY_BYTES=67108864
|
|
LAWSYNTH_GATEWAY_REQUESTS_PER_WINDOW=120
|
|
LAWSYNTH_GATEWAY_RATE_WINDOW_SECONDS=60
|
|
LAWSYNTH_GATEWAY_CPU_LIMIT=1
|
|
LAWSYNTH_GATEWAY_MEMORY_LIMIT=1g
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Artifact / scheduler / workers
|
|
# ---------------------------------------------------------------------------
|
|
LAWSYNTH_ARTIFACT_CPU_LIMIT=1
|
|
LAWSYNTH_ARTIFACT_MEMORY_LIMIT=1g
|
|
LAWSYNTH_SCHEDULER_LEASE_SECONDS=60
|
|
LAWSYNTH_SCHEDULER_CPU_LIMIT=1
|
|
LAWSYNTH_SCHEDULER_MEMORY_LIMIT=512m
|
|
LAWSYNTH_WORKER_REPLICAS=3
|
|
LAWSYNTH_WORKER_MAX_CONCURRENCY=4
|
|
LAWSYNTH_WORKER_JOB_TIMEOUT_SECONDS=7200
|
|
LAWSYNTH_WORKER_CPU_LIMIT=2
|
|
LAWSYNTH_WORKER_MEMORY_LIMIT=4g
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Backups (backup.sh)
|
|
# ---------------------------------------------------------------------------
|
|
BACKUP_ROOT=/var/backups/lawsynth
|
|
RETENTION=24
|