Files
lincodex/.env.example
T

120 lines
5.7 KiB
Bash

# Local-only configuration. Replace placeholder passwords before starting services.
APP_PROJECT=app
APP_NETWORK=app_default
APP_HTTP_PORT=8080
# Address the frontend port is published on. Keep the loopback default for a
# local stack. On a host that sits behind the edge proxy, set the address of
# its tunnel interface (for example 10.79.0.2); never 0.0.0.0.
APP_HTTP_BIND=127.0.0.1
POSTGRES_DB=lincodex
POSTGRES_USER=lincodex
POSTGRES_PASSWORD=replace-this-local-password
REDIS_PASSWORD=replace-this-redis-password
SEAWEEDFS_ACCESS_KEY=lincodex-local
SEAWEEDFS_SECRET_KEY=replace-this-storage-secret
SEAWEEDFS_BUCKET=lincodex
# Kafka KRaft cluster identifier. It is not a secret and grants no access; it
# ties the formatted log directory to one cluster. Generate your own value with
# `docker run --rm apache/kafka:latest /opt/kafka/bin/kafka-storage.sh random-uuid`
# before the first start; changing it later stops Kafka from using the existing volume.
KAFKA_CLUSTER_ID=SJv4PXUUSJGbK3eSPC57qA
# Mail. EMAIL_PROVIDER is required and selects exactly one transport:
# resend, smtp, or disabled; there is no default. resend sends through the
# Resend HTTP API and the working stand sets it explicitly. This example sets
# disabled so that local runs need no key. This build has no SMTP transport
# yet, so smtp fails startup after its settings are validated. disabled sends
# nothing and reports the mail channel as unavailable; it never confirms an
# address or skips an account check.
EMAIL_PROVIDER=disabled
EMAIL_FROM=no-reply@example.com
# Label of the provider account (lowercase letters, digits, ".", "_", "-"),
# never the key. Every new delivery is pinned to EMAIL_PROVIDER and this
# label, and the mail quota is counted under it. Change it whenever the key
# belongs to another provider account, and only then: renaming the label of
# the same account resets the local quota count.
EMAIL_ACCOUNT=default
EMAIL_TIMEOUT=10s
# Recipients the configured provider account may be sent per UTC day and per
# UTC calendar month. Empty means the Resend Free plan limits, 100 and 3000,
# for resend and disabled; smtp requires both values. A used-up quota makes
# mail wait for the reset; nothing buys a plan or switches the transport.
EMAIL_QUOTA_DAILY=
EMAIL_QUOTA_MONTHLY=
# Public origin for links in mail. Email confirmation requires the browser's
# Origin header to match this scheme, host, and port. Use HTTPS except on
# localhost, 127.0.0.1, or [::1]. Do not add a path, query, or fragment.
APP_PUBLIC_URL=http://localhost:8080
# Read only when EMAIL_PROVIDER=resend, where it is required. Keep the real
# key in the server environment only; it is never logged.
RESEND_API_KEY=
# Read only when EMAIL_PROVIDER=smtp. SMTP_TLS_MODE is starttls or tls;
# plaintext SMTP is not supported.
SMTP_HOST=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_TLS_MODE=
# Password hashing: Argon2id derivations that may run at once, from 1 to 4.
# Each takes 64 MiB; the backend container has 1 CPU and 768 MB of memory, so
# more than 1 only adds memory while the derivations share the CPU.
PASSWORD_HASH_CONCURRENCY=1
# The app Docker network has a pinned subnet and the frontend container a fixed
# address on it, so the backend can trust exactly that one proxy. Change the
# two together if the range collides with another network or route.
APP_SUBNET=172.29.79.0/24
APP_FRONTEND_IP=172.29.79.10
# Registration and email confirmation. IDENTITY_KEY_SECRET is required. It
# keys idempotency records, rate-limit counters, session CSRF tokens, and
# organization-scoped candidate aliases across restarts and instances.
# Use at least 32 bytes. There is no usable example value: leave it empty here
# and generate one for every deployment (Compose refuses an empty value):
# openssl rand -base64 48
# A value that starts with replace-this is refused. Without it the backend refuses to start, unless a development stand sets
# IDENTITY_ALLOW_EPHEMERAL_KEY=true (a random secret per process; candidate
# aliases also change after restart).
IDENTITY_KEY_SECRET=
# Registration and every verification resend count toward both per-address limits.
VERIFICATION_MAIL_MIN_INTERVAL=1m
VERIFICATION_MAIL_DAILY_LIMIT=5
# Confirmation attempts are limited to 5 per token per hour by the service.
# This token limit is fixed; it has no environment setting.
# IDENTITY_CLIENT_HOURLY_LIMIT applies to registration, confirmation, resends,
# and login per resolved client address per hour, when available.
IDENTITY_CLIENT_HOURLY_LIMIT=30
# Login attempts are limited by the resolved client address and normalized
# email address. The email limit applies whether or not the account exists.
IDENTITY_LOGIN_EMAIL_HOURLY_LIMIT=10
# Sessions expire after this much inactivity or at the absolute lifetime,
# whichever comes first. Idle must not exceed absolute; idle is capped at 30d
# and absolute at 365d.
IDENTITY_SESSION_IDLE_TIMEOUT=24h
IDENTITY_SESSION_ABSOLUTE_LIFETIME=168h
# Reverse proxies the backend trusts to report the client address in
# X-Forwarded-For. Leave it unset: the default is the frontend container's
# APP_FRONTEND_IP as a single address. A wider list lets other containers (or a
# client behind them) choose their own address; empty trusts nobody.
# TRUSTED_PROXY_CIDRS=
# Optional PostgreSQL metrics login, created when the database volume is initialized.
POSTGRES_EXPORTER_USER=metrics_reader
POSTGRES_EXPORTER_PASSWORD=replace-this-metrics-password
GRAFANA_PORT=3000
GRAFANA_ADMIN_USER=admin
GRAFANA_ADMIN_PASSWORD=replace-this-grafana-password
# Set these only on the separate ML host when remote private access is configured.
ML_BIND_ADDRESS=127.0.0.1
ML_HTTP_PORT=8000
ML_METRICS_TARGET=
# For rootless Docker, use the Unix socket from `docker context inspect`.
DOCKER_SOCKET_PATH=/var/run/docker.sock