2021-10-28 04:06:03 +00:00
|
|
|
## Required: path to store pict-rs database
|
2021-10-28 05:17:37 +00:00
|
|
|
# environment variable: PICTRS_PATH
|
2021-10-28 04:06:03 +00:00
|
|
|
path = './data'
|
|
|
|
|
|
|
|
## Optional: pict-rs binding address
|
2021-10-28 05:17:37 +00:00
|
|
|
# environment variable: PICTRS_ADDR
|
2021-10-28 04:06:03 +00:00
|
|
|
# default: 0.0.0.0:8080
|
|
|
|
addr = '0.0.0.0:8080'
|
|
|
|
|
|
|
|
## Optional: format to transcode all uploaded images
|
2021-10-28 05:17:37 +00:00
|
|
|
# environment variable: PICTRS_IMAGE_FORMAT
|
2021-10-28 04:06:03 +00:00
|
|
|
# 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
|
2021-10-28 04:06:03 +00:00
|
|
|
# This does not affect gif or mp4 uploads
|
2021-10-28 05:17:37 +00:00
|
|
|
image_format = 'jpeg'
|
2021-10-28 04:06:03 +00:00
|
|
|
|
|
|
|
## Optional: permitted image processing filters
|
2021-10-28 05:17:37 +00:00
|
|
|
# environment variable: PICTRS_FILTERS
|
2021-10-28 04:06:03 +00:00
|
|
|
# valid options: 'identity', 'thumbnail', 'resize', 'crop', 'blur'
|
|
|
|
# default: empty
|
|
|
|
#
|
|
|
|
# Not specifying filters implies all filters are permitted
|
|
|
|
filters = [
|
2021-10-28 05:17:37 +00:00
|
|
|
'identity',
|
|
|
|
'thumbnail',
|
|
|
|
'resize',
|
|
|
|
'crop',
|
|
|
|
'blur',
|
2021-10-28 04:06:03 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
## Optional: image bounds
|
2021-10-28 05:17:37 +00:00
|
|
|
# environment variable: PICTRS_MAX_FILE_SIZE
|
2021-10-28 04:06:03 +00:00
|
|
|
# default: 40
|
2021-10-28 05:17:37 +00:00
|
|
|
max_file_size = 40 # in Megabytes
|
|
|
|
# environment variable: PICTRS_MAX_IMAGE_WIDTH
|
2021-10-28 04:06:03 +00:00
|
|
|
# default: 10,000
|
2021-10-28 05:17:37 +00:00
|
|
|
max_image_width = 10000 # in Pixels
|
|
|
|
# environment variable: PICTRS_MAX_IMAGE_HEIGHT
|
2021-10-28 04:06:03 +00:00
|
|
|
# default: 10,000
|
2021-10-28 05:17:37 +00:00
|
|
|
max_image_height = 10000 # in Pixels
|
|
|
|
# environment variable: PICTRS_MAX_IMAGE_AREA
|
2021-10-29 01:59:11 +00:00
|
|
|
# default: 40,000,000
|
|
|
|
max_image_area = 40000000 # in Pixels
|
2021-10-28 04:06:03 +00:00
|
|
|
|
2021-10-28 05:17:37 +00:00
|
|
|
## Optional: skip image validation on the import endpoint
|
|
|
|
# environment variable: PICTRS_SKIP_VALIDATE_IMPORTS
|
2021-10-28 04:06:03 +00:00
|
|
|
# default: false
|
2021-10-28 05:17:37 +00:00
|
|
|
skip_validate_imports = false
|
|
|
|
|
|
|
|
## Optional: shared secret for internal endpoints
|
|
|
|
# environment variable: PICTRS_API_KEY
|
|
|
|
# default: empty
|
|
|
|
#
|
|
|
|
# Not specifying api_key disables internal endpoints
|
|
|
|
api_key = 'API_KEY'
|
2021-10-28 04:06:03 +00:00
|
|
|
|
|
|
|
## Optional: url for exporting otlp traces
|
2021-10-28 05:17:37 +00:00
|
|
|
# environment variable: PICTRS_OPENTELEMETRY_URL
|
2021-10-28 04:06:03 +00:00
|
|
|
# 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/'
|
2021-10-28 04:06:03 +00:00
|
|
|
|
|
|
|
## 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
|
2021-10-28 04:06:03 +00:00
|
|
|
[store]
|
2021-10-28 05:17:37 +00:00
|
|
|
type = "file_store"
|
|
|
|
|
|
|
|
## Example file store
|
|
|
|
# [store]
|
|
|
|
#
|
|
|
|
# # environment variable: PICTRS_STORE__TYPE
|
|
|
|
# type = 'file_store'
|
|
|
|
#
|
|
|
|
# # Optional: file path
|
|
|
|
# # environment variable: PICTRS_STORE__PATH
|
|
|
|
# # default: empty
|
|
|
|
# #
|
|
|
|
# # Not specifying path means pict-rs' top-level `path` config is used
|
|
|
|
# path = './data'
|
2021-10-28 04:06:03 +00:00
|
|
|
|
|
|
|
## Example s3 store
|
|
|
|
# [store]
|
2021-10-28 05:17:37 +00:00
|
|
|
#
|
|
|
|
# # environment variable: PICTRS_STORE__TYPE
|
|
|
|
# type = 's3_store'
|
|
|
|
#
|
|
|
|
# # Required: bucket name
|
|
|
|
# # environment variable: PICTRS_STORE__BUCKET_NAME
|
|
|
|
# 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
|
|
|
|
# # default: empty
|
|
|
|
# access_key = 'ACCESS_KEY'
|
|
|
|
#
|
|
|
|
# # Optional: bucket secret key
|
|
|
|
# # environment variable: PICTRS_STORE__SECRET_KEY
|
|
|
|
# # default: empty
|
|
|
|
# secret_key = 'SECRET_KEY'
|
|
|
|
#
|
|
|
|
# # Optional: bucket security token
|
|
|
|
# # environment variable: PICTRS_STORE__SECURITY_TOKEN
|
|
|
|
# # default: empty
|
|
|
|
# security_token = 'SECURITY_TOKEN'
|
|
|
|
#
|
|
|
|
# # Optional: bucket session token
|
|
|
|
# # environment variable: PICTRS_STORE__SESSION_TOKEN
|
|
|
|
# # default: empty
|
|
|
|
# session_token = 'SESSION_TOKEN'
|