Files
ystp/docker/.env.production.example
237899745 64b1169e8c
Some checks failed
CI / verify (push) Has been cancelled
feat: add runtime policy and observability
2026-07-25 20:00:11 +08:00

58 lines
1.8 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
# A four-core host should start with two image jobs per process.
DATABASE_MAX_CONNECTIONS=10
WORKER_CONCURRENCY=2
IMAGE_PROCESSING_CONCURRENCY=2
# 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
# 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