Files
gpt-load/.env.example
T

53 lines
2.3 KiB
Bash

# HTTP server
# Native HOST and Compose host publishing default to loopback. HOST=0.0.0.0 or
# BIND_ADDRESS=0.0.0.0 is an explicit opt-in that requires a controlled network
# boundary, TLS reverse proxy, and ACL/firewall protection in production.
# The release image and Compose override HOST=0.0.0.0 inside the container only.
HOST=127.0.0.1
BIND_ADDRESS=127.0.0.1
PORT=3001
GRACEFUL_SHUTDOWN_TIMEOUT=10
# Container runtime budget; keep this longer than the application timeout.
CONTAINER_STOP_GRACE_PERIOD=15s
# Maximum time to read a complete request, including its body (seconds).
READ_TIMEOUT=60
# Maximum keep-alive idle time between requests (seconds).
IDLE_TIMEOUT=120
# Native process paths:
# - DATA_DIR is resolved in the host process namespace. A relative path is
# relative to the process working directory.
# - An empty DATABASE_DSN selects application-managed SQLite and resolves to
# ${DATA_DIR}/gpt-load.db.
# - Every non-empty DATABASE_DSN is operator-managed external storage, even
# when it is textually equal to the managed default. GPT-Load does not create
# its parent directory or change its DB/WAL/SHM permissions.
# - DATA_DIR also holds generated auth.key and encryption.key files.
#
# Container paths:
# - The 2.x Compose contract overrides DATA_DIR=/app/data but intentionally
# leaves DATABASE_DSN empty, selecting managed /app/data/gpt-load.db in the
# gpt-load-data named volume.
# - Do not put a host absolute path here and expect it to exist in a container.
# A custom container DATABASE_DSN requires a Compose override with both a
# container path and a matching volume mount.
DATA_DIR=./data
DATABASE_DSN=
# Optional management bearer credential. A non-empty AUTH_KEY takes priority and
# must not contain whitespace. When empty, GPT-Load reads or creates
# ${DATA_DIR}/auth.key. Back up this credential securely and restrict access;
# generation logs only its path, never the full value.
AUTH_KEY=
# Optional explicit encryption master key. When empty, GPT-Load creates
# ${DATA_DIR}/encryption.key with 0600 permissions on POSIX or a current-user
# ACL on Windows. Back it up together with the SQLite database; losing or
# replacing it makes encrypted upstream keys unreadable. 2.0.0 does not
# support master-key rotation.
ENCRYPTION_KEY=
# Logging
LOG_LEVEL=info
LOG_FORMAT=text