.env.example
Repository file .env.example at commit ae207ad.
# FHIR Validation Service — environment template.
# Copy to `.env` (git-ignored) and replace every `change-me` value.
# Full reference: specs/001-service-hardening/contracts/configuration.md
# --- Compose ---------------------------------------------------------------
COMPOSE_PROJECT_NAME=fhir
FV_TAG=latest
# Container memory; the JVM uses 75% as heap. 4g fits IG sets up to ~350 MB expanded (~30 MB archive), including the
# 20 MB IGs SC-004 measures. 2g still runs 4 FHIR versions but only fits IG sets up to ~100 MB expanded; below 2g,
# warming can run out of heap. Too-large includes get 413 package-too-large.
FV_MEMORY_LIMIT=4g
# --- Service ---------------------------------------------------------------
FV_PROFILE=prod
# Optional JSON file with settings (below environment variables in precedence); not for FV_LOG_FORMAT.
# FV_CONFIG_FILE=/etc/fhir-validator/config.json
# text | json
FV_LOG_FORMAT=text
FV_HTTP_PORT=8880
FV_HTTP_INSTANCES=
# Request body limit; IG uploads (/igs/upload) may be as large as FV_PACKAGE_MAX_COMPRESSED_MB + 1.
FV_HTTP_MAX_BODY_MB=20
FV_HTTP_REQUEST_TIMEOUT_MS=60000
FV_CORS_ALLOWED_ORIGINS=
FV_VALIDATION_WORKERS=
FV_VALIDATION_MAX_PENDING=
FV_VALIDATION_MAX_BUNDLE_ENTRIES=10000
FV_VALIDATION_TIMEOUT_MS=30000
# Validator builds use at most FV_PACKAGE_WORKERS - 1 of these, keeping one free for upload parsing and DNS work
FV_PACKAGE_WORKERS=2
# Administrative operations (upload, register, POST/PATCH/DELETE /{version}/validator) in progress per instance
FV_ADMIN_MAX_PENDING=4
# Terminology servers per included IG. Servers come only from the official HL7 registry (not configurable).
# How often the registry's server list is refreshed (300000-604800000)
FV_TX_REGISTRY_REFRESH_MS=21600000
# One terminology call (500-60000) / a request's total terminology time (1000-120000)
FV_TX_TIMEOUT_MS=5000
FV_TX_REQUEST_BUDGET_MS=10000
# Code results cached per instance (100-1000000; about 1 KB each) and for how long (10000-86400000)
FV_TX_CACHE_SIZE=50000
FV_TX_CACHE_TTL_MS=600000
# Pooled connections per terminology server (1-200)
FV_TX_MAX_CONNECTIONS_PER_SERVER=10
FV_PACKAGE_CACHE_MAX_MB=256
# Hosts (registry https://<host>) or base URLs (scheme://host[:port])
FV_PACKAGE_SOURCES=packages.fhir.org,packages2.fhir.org
FV_PACKAGE_REGISTRY_ENABLED=true
# Dev profile only: allow http / private-network package sources
FV_PACKAGE_ALLOW_INSECURE_SOURCES=false
FV_PACKAGE_FETCH_TIMEOUT_MS=30000
FV_PACKAGE_MAX_COMPRESSED_MB=50
FV_PACKAGE_MAX_EXPANDED_MB=500
FV_PACKAGE_MAX_ENTRIES=20000
FV_PACKAGE_MAX_RATIO=100
FV_CONFIG_POLL_INTERVAL_MS=5000
# 32-128 characters of [A-Za-z0-9_-]. Without it, admin operations are refused.
FV_ADMIN_API_KEY=change-me-to-a-long-random-admin-key-0123456789
FV_AUTH_CACHE_TTL_MS=30000
# Validation always needs a VALIDATE or ADMIN key. This shared key belongs to the built-in "trial" organisation
# (shareable content only); leave it empty and create keys per client with 'fv-admin key create' instead.
FV_VALIDATOR_API_KEY=
# Networks administrative operations may come from (comma-separated CIDRs); empty = any.
FV_AUTH_ADMIN_CIDRS=
# Reverse proxies whose Forwarded / X-Forwarded-For headers are believed (comma-separated CIDRs); empty = none.
FV_AUTH_TRUSTED_PROXIES=
# true/1/yes turns API-key access control off for the whole deployment (public mode: no endpoint needs a key;
# FV_AUTH_ADMIN_CIDRS still applies). Closed networks only. Use the same value on every instance.
FV_GLOBAL_DISABLED_ACL_SECURITY=false
# Set to true only for the start that changes the access-control mode stored by the previous start; remove after.
FV_ACL_MODE_CHANGE_CONFIRMED=false
# FHIR versions this instance serves (comma-separated: STU3, R4, R4B, R5); empty = all. Same on every instance.
FV_ENABLED_FHIR_VERSIONS=
# Set to true only for the start that changes the served versions stored by the previous start; remove after.
FV_FHIR_VERSIONS_CHANGE_CONFIRMED=false
# The one header those proxies write: x-forwarded-for (default) or forwarded. The other header is never read.
FV_AUTH_FORWARDED_HEADER=x-forwarded-for
# --- Usage accounting -----------------------------------------------------
# none | log | db | log,db. "db" writes one row per validation to validation_usage (plan your own retention).
FV_USAGE_SINK=none
FV_USAGE_QUEUE_SIZE=10000
FV_USAGE_BATCH_SIZE=500
FV_USAGE_FLUSH_MS=1000
# --- System organisation --------------------------------------------------
# Applied to the built-in system organisation at every start; unset fields keep their stored values. Its type and
# active state can't be configured. Defaults: short name "system", long name "FHIR Validation Service", rest empty.
#FV_SYSTEM_ORG_NAME_SHORT=system
#FV_SYSTEM_ORG_NAME_LONG=FHIR Validation Service
#FV_SYSTEM_ORG_EMAIL=
#FV_SYSTEM_ORG_PHONE=
#FV_SYSTEM_ORG_WEBSITE=
#FV_SYSTEM_ORG_COUNTRY= # ISO 3166-1 alpha-2, e.g. DK
#FV_SYSTEM_ORG_POST_CODE=
#FV_SYSTEM_ORG_ADDRESS_LINES= # lines separated by |, e.g. Street 1|2. sal
#FV_SYSTEM_ORG_CONTACT_PERSON_NAME=
#FV_SYSTEM_ORG_CONTACT_PERSON_MOBILE=
#FV_SYSTEM_ORG_CONTACT_PERSON_EMAIL=
FV_READINESS_DB_STALENESS_MS=10000
FV_SHUTDOWN_PRE_DRAIN_MS=5000
FV_SHUTDOWN_GRACE_MS=20000
# --- Database (FV_* names always win over the legacy PG_* aliases) ---------
FV_PG_HOST=postgres
FV_PG_PORT=5432
FV_PG_DATABASE=fhir_validator
FV_PG_USER=postgres
FV_PG_PASSWORD=change-me
FV_PG_POOL_SIZE=15
FV_PG_SSL_MODE=prefer
# Used by the compose postgres service itself (keep equal to FV_PG_PASSWORD)
PG_PASSWORD=change-me
# --- JVM (container only) ---------------------------------------------------
JAVA_OPTS=-XX:MaxRAMPercentage=75 -XX:+ExitOnOutOfMemoryError
# --- Optional: compose `admin` profile (pgAdmin) ----------------------------
# Defaults to admin@example.org / admin when unset. pgAdmin is bound to 127.0.0.1 only.
#PGADMIN_DEFAULT_EMAIL=admin@example.org
#PGADMIN_DEFAULT_PASSWORD=change-me