Environment variables
An app’s own .env.example, which sofie gen keeps current, lists the ones its features read. Required ones have no default.
DATABASE_URL(required): The app’s database, and every module’s that sets none of its own.SOFIE_SIGNING_KEYS(required): Comma-separated base64 keys of 32 bytes sealing sessions and signing links; the first seals. Read asSOFIE_SESSION_KEYStoo, with a warning.SOFIE_BASE_URL: Where the app is reached, such ashttps://example.com, which mails, checkouts, OAuth and pages link back to; each package’s own base URL overrides it.SOFIE_ENVIRONMENT: The environment feature flags are narrowed to, such asproduction; an app with flags needs it.SOFIE_ADDRESS: Where the web role listens; 127.0.0.1:8080 when unset.SOFIE_TRUSTED_PROXIES: Comma-separated addresses or CIDR ranges of the proxies that may tell the client’s address; none when unset.SOFIE_REQUEST_ID_HEADER: The header a trusted proxy names its own request id in, logged asedge_request_idbeside the server’s;x-request-idwhen unset.SOFIE_CORS_ORIGINS: With thecorsfeature: comma-separatedarea=origin, such asapi=https://app.example.com, added to each area’s own origins; none when unset.SOFIE_TLS_CERTIFICATE: With thetlsfeature: the PEM file holding the certificate chain, leaf first; set withSOFIE_TLS_KEY, or neither for plain HTTP.SOFIE_TLS_KEY: With thetlsfeature: the PEM file holding the certificate’s PKCS#8, PKCS#1 or SEC1 key.SOFIE_SHIELD: With theshieldfeature:on,dry-run(reports only) oroff(tests, benchmarks, fuzzing); dry-run in a debug build and on in a release one when unset.SOFIE_SHIELD_THRESHOLDS: With theshieldfeature: comma-separatedrule=countorarea.rule=count, such asscan=60, web.probe=10; each rule’s default when unset.SOFIE_SHIELD_SHARED: With theshieldfeature:onshares blocks between instances through the database;offwhen unset.SOFIE_METRICS_TOKEN: With themetricsfeature: the bearer token, at least 32 characters, that/metricsasks for; without it/metricsdoes not exist.SOFIE_MIGRATE:onmigrates the database when the process starts;offwhen unset.SOFIE_TIME_ZONE: The IANA time zone instants are shown in, such asEurope/Istanbul; UTC when unset.SOFIE_LOG: Which events are logged, such asinfo,sofie_http=debug;infowhen unset.SOFIE_LOG_SAMPLE: The share of traces, from 0 to 1, whose info lines are logged; warnings and errors always are; 1 when unset.SOFIE_TRACE_SAMPLE: With theotlpfeature: the share of traces, from 0 to 1, that are exported; 1 when unset.SOFIE_BROWSER_SAMPLE: With thebrowser-telemetryfeature: the share of browser reports, from 0 to 1, that are kept; 1 when unset.SOFIE_PRODUCT_EVENTS_KEEP_DAYS: With theproduct-reportsfeature: days product events are kept; 400 when unset.SOFIE_RUNTIME_THREADS: Threads running requests and jobs; one per logical CPU when unset.SOFIE_DB_POOL_SIZE: Database connections the process keeps open at most; twice the runtime threads when unset.SOFIE_DB_POOL_WAIT_MS: Milliseconds a request waits for a free connection before it is answered 503; 5000 when unset.SOFIE_WORKER_BATCH: Messages the worker claims and handles at once; 2 when unset.SOFIE_WORKER_POOL_SIZE: Connections of a pool of the worker’s own, so jobs cannot take the requests’ connections; the app’s pool when unset.SOFIE_CACHE_STORE: With thecachefeature:memory,database(withcache-database) orredis(withcache-redis);memorywhen unset.SOFIE_REDIS_URL: WithSOFIE_CACHE_STORE=redis:redis://[user:password@]host[:port][/database], orrediss://for TLS.SOFIE_SEARCH: With thesearch-meilisearchfeature:databaseormeilisearch, the engine searched records are matched by;databasewhen unset.SOFIE_SEARCH_MEILISEARCH_URL: WithSOFIE_SEARCH=meilisearch: where Meilisearch answers, such ashttps://search.example.com.SOFIE_SEARCH_MEILISEARCH_API_KEY: WithSOFIE_SEARCH=meilisearch: the key Meilisearch asks for, allowed to search and to write documents and settings; none when unset.SOFIE_SEARCH_MEILISEARCH_PRIVATE: WithSOFIE_SEARCH=meilisearch:onlets it be a private address spoken to over plain HTTP, for a Meilisearch inside the network;offwhen unset.SOFIE_STORAGE: With thestoragefeature:local, ors3(withstorage-s3), where stored files are kept;localwhen unset.SOFIE_STORAGE_ROOT: WithSOFIE_STORAGE=local: the directory stored files are kept in;storagewhen unset.SOFIE_STORAGE_S3_ENDPOINT: WithSOFIE_STORAGE=s3: where an S3-compatible service answers; AWS’s endpoint for the region when unset.SOFIE_STORAGE_S3_REGION: WithSOFIE_STORAGE=s3: the bucket’s region, such aseu-central-1.SOFIE_STORAGE_S3_BUCKET: WithSOFIE_STORAGE=s3: the bucket stored files are kept in.SOFIE_STORAGE_S3_ACCESS_KEY_ID: WithSOFIE_STORAGE=s3: the access key’s id.SOFIE_STORAGE_S3_SECRET_ACCESS_KEY: WithSOFIE_STORAGE=s3: the access key’s secret.SOFIE_STORAGE_S3_PATH_STYLE: WithSOFIE_STORAGE=s3:onnames the bucket in the path rather than the host, as MinIO asks;offwhen unset.SOFIE_STORAGE_S3_PRIVATE: WithSOFIE_STORAGE=s3:onlets it be a private address spoken to over plain HTTP, for a service inside the network;offwhen unset.SOFIE_BILLING_PROVIDER: With thebillingfeature:stripeorpaddle, the provider payments go through; none when unset, and plans, trials and quotas still work.SOFIE_BILLING_API_KEY: WithSOFIE_BILLING_PROVIDER: the provider’s API key.SOFIE_BILLING_WEBHOOK_SECRET: WithSOFIE_BILLING_PROVIDER: the secret the provider signs its webhooks with.SOFIE_BILLING_BASE_URL: WithSOFIE_BILLING_PROVIDER: where checkouts return to, such ashttps://example.com. SOFIE_BASE_URL when unset.SOFIE_BILLING_PRICES: WithSOFIE_BILLING_PROVIDER: comma-separatedplan or product=price id, such aspro=price_123,credits=price_456.SOFIE_BILLING_API_URL: WithSOFIE_BILLING_PROVIDER: where the provider’s API answers; the provider’s own when unset.SOFIE_NOTIFY_VAPID_PUBLIC_KEY: With thenotifyfeature: the base64url VAPID public key web push is sent with; set all three VAPID keys or none, and none sends no web push.SOFIE_NOTIFY_VAPID_PRIVATE_KEY: With thenotifyfeature: the base64url VAPID private key.SOFIE_NOTIFY_VAPID_SUBJECT: With thenotifyfeature: the contact push services may reach, such asmailto:[email protected].SOFIE_OAUTH_PROVIDERS: Comma-separatedgoogle,microsoft,githubor another OpenID Connect provider’s name; none offered when unset. Each readsSOFIE_OAUTH_<NAME>_CLIENT_IDand_CLIENT_SECRET, Microsoft_TENANT, and another provider_LABEL,_ISSUER,_AUTHORIZATION_URLand_TOKEN_URL.SOFIE_OAUTH_BASE_URL: WithSOFIE_OAUTH_PROVIDERS: the app’s public URL without a trailing/, which providers return to. SOFIE_BASE_URL when unset.
Generated from sofie at 4aa7c05.
