Files
gpt-load/.env.example
T

62 lines
2.8 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.
# - A non-empty DATABASE_DSN must use one unified URL form for sqlite, mysql, or
# postgres. It is operator-managed external storage; GPT-Load does not create
# its parent directory, database, user, or change external permissions.
# Examples:
# sqlite:///var/lib/gpt-load.db
# mysql://user:password@db.example:3306/gpt_load?charset=utf8mb4&collation=utf8mb4_bin
# postgres://user:password@db.example:5432/gpt_load?sslmode=require
# - 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 SQLite path here and expect it to exist in a
# container. A custom container-managed SQLite path requires a Compose
# override with both a container path and a matching volume mount. Network
# database URLs do not use the named volume.
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 selected database; losing or
# replacing it makes encrypted channel credentials unreadable. 2.0.0 does not
# support master-key rotation.
ENCRYPTION_KEY=
# Logging
LOG_LEVEL=info
LOG_FORMAT=text
# Optional system-only override for Models.dev automatic catalog synchronization.
# Leave unset to use the dynamic setting (enabled by default).
# MODELS_DEV_AUTO_SYNC_ENABLED=true