Files
ystp/docker/.env.production.example
2026-07-26 05:47:19 +08:00

65 lines
2.0 KiB
Plaintext

# Image tag built by docker/docker-compose.prod.yml
IMAGEFORGE_TAG=local
# Optional regional mirror used only while building Debian image layers.
DEBIAN_MIRROR=http://deb.debian.org/debian
# Optional sparse Cargo registry mirror used only while building the API image.
CARGO_REGISTRY_MIRROR=
# Public listener and URL
IMAGEFORGE_BIND_ADDRESS=127.0.0.1
IMAGEFORGE_PORT=8080
PUBLIC_BASE_URL=http://192.0.2.10:8080
# Replace every secret before starting the stack.
POSTGRES_PASSWORD=replace-with-a-long-random-password
JWT_SECRET=replace-with-at-least-32-random-bytes
API_KEY_PEPPER=replace-with-an-independent-random-secret
# Initial administrator created on first startup. ADMIN_EMAIL is optional.
ADMIN_EMAIL=admin@example.com
ADMIN_USERNAME=admin
ADMIN_PASSWORD=replace-with-a-strong-admin-password
# 8-core starting point: four tasks, two files per task, four CPU-bound image jobs.
DATABASE_MAX_CONNECTIONS=16
WORKER_TASK_CONCURRENCY=4
WORKER_CONCURRENCY=2
IMAGE_PROCESSING_CONCURRENCY=4
# Two concurrent 2 GiB ZIP builds require roughly 8 GiB of temporary disk.
ZIP_BUILD_CONCURRENCY=2
ZIP_MAX_ENTRIES=200
ZIP_MAX_UNCOMPRESSED_BYTES=2147483648
# Resource ceilings tuned for an 8-core / 16 GB application host.
POSTGRES_MEMORY_LIMIT=2g
REDIS_MEMORY_LIMIT=1g
REDIS_MAXMEMORY=768mb
API_MEMORY_LIMIT=3g
WORKER_MEMORY_LIMIT=8g
ALLOW_ANONYMOUS_UPLOAD=true
ANON_MAX_FILE_SIZE_MB=5
ANON_MAX_FILES_PER_BATCH=5
ANON_DAILY_UNITS=10
ANON_RETENTION_HOURS=24
MAX_IMAGE_PIXELS=40000000
IDEMPOTENCY_TTL_HOURS=24
# Enable only when the API port is reachable exclusively through a trusted proxy.
TRUST_PROXY_HEADERS=false
MAIL_ENABLED=false
MAIL_LOG_LINKS_WHEN_DISABLED=false
# STRIPE_SECRET_KEY=sk_live_replace_me
# STRIPE_WEBHOOK_SECRET=whsec_replace_me
# STRIPE_API_BASE_URL=https://api.stripe.com
# MAIL_PROVIDER=custom
# MAIL_FROM=noreply@example.com
# MAIL_PASSWORD=replace-with-smtp-authorization-code
# MAIL_FROM_NAME=ImageForge
# MAIL_SMTP_HOST=smtp.example.com
# MAIL_SMTP_PORT=465
# MAIL_SMTP_ENCRYPTION=ssl
RUST_LOG=info,tower_http=info,imageforge=info