pict-rs/pict-rs.toml

153 lines
4.4 KiB
TOML
Raw Normal View History

## Required: path to store pict-rs database
# environment variable: PICTRS__PATH
path = './data'
## Optional: pict-rs binding address
# environment variable: PICTRS__ADDR
# default: 0.0.0.0:8080
addr = '0.0.0.0:8080'
## Optional: format to transcode all uploaded images
# environment variable: PICTRS__IMAGE_FORMAT
# valid options: 'jpeg', 'png', 'webp'
# default: empty
#
2021-10-28 05:17:37 +00:00
# Not specifying image_format means images will be stored in their original format
# This does not affect gif or mp4 uploads
2021-10-28 05:17:37 +00:00
image_format = 'jpeg'
## Optional: permitted image processing filters
# environment variable: PICTRS__FILTERS
# valid options: 'identity', 'thumbnail', 'resize', 'crop', 'blur'
# default: empty
#
# Not specifying filters implies all filters are permitted
filters = ['identity', 'thumbnail', 'resize', 'crop', 'blur']
## Optional: image bounds
# environment variable: PICTRS__MAX_FILE_SIZE
# default: 40
2021-10-28 05:17:37 +00:00
max_file_size = 40 # in Megabytes
# environment variable: PICTRS__MAX_IMAGE_WIDTH
# default: 10,000
2021-11-23 00:24:05 +00:00
max_image_width = 10_000 # in Pixels
# environment variable: PICTRS__MAX_IMAGE_HEIGHT
# default: 10,000
2021-11-23 00:24:05 +00:00
max_image_height = 10_000 # in Pixels
# environment variable: PICTRS__MAX_IMAGE_AREA
2021-10-29 01:59:11 +00:00
# default: 40,000,000
2021-11-23 00:24:05 +00:00
max_image_area = 40_000_000 # in Pixels
2021-10-28 05:17:37 +00:00
## Optional: skip image validation on the import endpoint
# environment variable: PICTRS__SKIP_VALIDATE_IMPORTS
# default: false
2021-10-28 05:17:37 +00:00
skip_validate_imports = false
## Optional: set sled's cache capacity to a given number of bytes
# environment variable: PICTRS__SLED_CACHE_CAPACITY
# default: 67_108_864 (1024 * 1024 * 64) e.g. 64MB
#
# Increasing this value can improve performance by keeping more of the database in RAM
sled_cache_capacity = 67_108_864 # in bytes
## Optional: enable tokio-console and set the event buffer size
# environment variable: PICTRS__CONSOLE_BUFFER_CAPACITY
# default: empty
#
# NOTE: this is the number of _events_ to buffer, not the number of bytes. In reality, the amount of
# RAM used will be significatnly larger (in bytes) than the buffer capacity (in events)
#
# When set, tokio-console can connect to the pict-rs service on port 6669
#
# Configure your container to expose the console port
# ```
# # docker-compose.yml
# version: '3.3'
#
# services:
# pictrs:
# image: asonix/pictrs:v0.3.0-beta.6
# ports:
# - "127.0.0.1:8080:8080"
# - "127.0.0.1:6669:6669" # this is the line that exposes console
# restart: always
# volumes:
# - ./volumes/pictrs:/mnt
# ```
#
# Connect from console
# ```
# $ tokio-console localhost 6669
# ```
console_buffer_capacity = 102_400 # 102_400 (or 1024 * 100) is the default size used by console-subscriber
2021-10-28 05:17:37 +00:00
## Optional: shared secret for internal endpoints
# environment variable: PICTRS__API_KEY
2021-10-28 05:17:37 +00:00
# default: empty
#
# Not specifying api_key disables internal endpoints
api_key = 'API_KEY'
## Optional: url for exporting otlp traces
# environment variable: PICTRS__OPENTELEMETRY_URL
# default: empty
#
2021-10-28 05:17:37 +00:00
# Not specifying opentelemetry_url means no traces will be exported
opentelemetry_url = 'http://localhost:4317/'
## Optional: store definition
2021-10-28 05:17:37 +00:00
# default store: file_store
2021-10-28 05:20:30 +00:00
#
# Not specifying a store means a file_store will be used with the top-level pict-rs' path
[store]
2021-10-28 05:17:37 +00:00
type = "file_store"
## Example file store
# [store]
#
# # environment variable: PICTRS__STORE__TYPE
2021-10-28 05:17:37 +00:00
# type = 'file_store'
#
# # Optional: file path
# # environment variable: PICTRS__STORE__PATH
2021-10-28 05:17:37 +00:00
# # default: empty
# #
# # Not specifying path means pict-rs' top-level `path` config is used
# path = './data'
## Example s3 store
# [store]
2021-10-28 05:17:37 +00:00
#
# # environment variable: PICTRS__STORE__TYPE
2021-10-28 05:17:37 +00:00
# type = 's3_store'
#
# # Required: bucket name
# # environment variable: PICTRS__STORE__BUCKET_NAME
2021-10-28 05:17:37 +00:00
# bucket_name = 'rust_s3'
#
# # Required: bucket region
# # environment variable: PICTRS__STORE__REGION
2021-10-29 02:15:20 +00:00
# #
# # can also be endpoint of local s3 store, e.g. 'http://minio:9000'
# region = 'eu-central-1'
2021-10-28 05:17:37 +00:00
#
# # Optional: bucket access key
# # environment variable: PICTRS__STORE__ACCESS_KEY
2021-10-28 05:17:37 +00:00
# # default: empty
# access_key = 'ACCESS_KEY'
#
# # Optional: bucket secret key
# # environment variable: PICTRS__STORE__SECRET_KEY
2021-10-28 05:17:37 +00:00
# # default: empty
# secret_key = 'SECRET_KEY'
#
# # Optional: bucket security token
# # environment variable: PICTRS__STORE__SECURITY_TOKEN
2021-10-28 05:17:37 +00:00
# # default: empty
# security_token = 'SECURITY_TOKEN'
#
# # Optional: bucket session token
# # environment variable: PICTRS__STORE__SESSION_TOKEN
2021-10-28 05:17:37 +00:00
# # default: empty
# session_token = 'SESSION_TOKEN'