-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.sample.yml
More file actions
110 lines (110 loc) · 4.19 KB
/
config.sample.yml
File metadata and controls
110 lines (110 loc) · 4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
server:
# The address where the server will run.
# `HOST` in env
host: "localhost"
# The port where the server will run.
# `PORT` in env. Range 0-65535 (uint16). Default is 3000
port: 3000
# Timeout in milliseconds for graceful shutdown
# `SHUTDOWN_TIMEOUT` in env. Range uint (https://pkg.go.dev/builtin#uint). Default is 5000
shutdownTimeout: 5000
# Endpoint like /ping for load balancers or uptime bots
# Read more: https://go-chi.io/#/pages/middleware?id=heartbeat
heartbeat:
# `HEARTBEAT_ENABLE` in env. Default is false
enable: false
# `HEARTBEAT_PATH` in env. Default is `/ping`
path: "/ping"
# Throttle limits the number of requests that can be processed simultaneously
# and establishes a queue of requests
throttle:
# `THROTTLE_ENABLE` in env. Default is false
enable: false
# Number of requests that can be processed simultaneously.
# The optimal value is calculated by the formula: number of processor threads * 2.
# `THROTTLE_LIMIT` in env. Required parameter!
limit: 2
# Queue size for requests.
# `THROTTLE_BACKLOG` in env. Default is 3
backlog: 3
# Number of seconds requests can stay in the queue.
# `THROTTLE_BACKLOG_TIMEOUT` in env. Default is 5
backlogTimeout: 5
# TLS settings
tls:
# Enables HTTPS listener.
# `TLS_ENABLE` in env. Default is false
enable: false
# Path to TLS certificate file (PEM). Required when TLS is enabled.
# `TLS_CERT_FILE` in env.
certFile: "./certs/server.crt"
# Path to TLS private key file (PEM). Required when TLS is enabled.
# `TLS_KEY_FILE` in env.
keyFile: "./certs/server.key"
# Enables HTTP/2 support. For browsers/clients this is relevant mostly with TLS.
# `ENABLE_HTTP2` in env. Default is true
enableHttp2: true
discord:
# Secret token for Discord bot.
# You can create a bot on the Discord Developer Portal:
# https://discord.com/developers/applications
# `BOT_TOKEN` in env. Required parameter!
botToken: "your bot token"
# The cache is used to store previously generated GIFs instead of re-generating them.
# Disabled by default
cache:
# Cache storage location. Must be either `fs` (on disk), `memory` (in memory), `s3` (Amazon S3 or compatible) or nothing.
# `CACHE_STORAGE` in env. Default is nothing
storage: "fs"
# Memory cache configuration
memory:
# Cache capacity (number of items to store in memory).
# `CACHE_MEMORY_CAPACITY` in env. Range uint (https://pkg.go.dev/builtin#uint). Default is 100
capacity: 100
# Filesystem cache configuration
fs:
# Directory where the cache will be stored.
# `CACHE_FS_PATH` in env. Default is `./cache`
path: "./cache"
# TTL in seconds for filesystem cache items.
# If omitted or set to 0, TTL cleanup is disabled.
# `CACHE_FS_TTL` in env. Optional parameter.
ttl: 0
# S3 cache configuration
s3:
# S3 bucket name (required for S3 storage).
# `CACHE_S3_BUCKET` in env.
bucket: "petpet-cache"
# S3 endpoint URL.
# Use this for custom S3-compatible services like MinIO or for specific AWS endpoints.
# Leave empty to use the default AWS S3 endpoint.
# `CACHE_S3_ENDPOINT` in env.
endpoint: "http://localhost:9000"
# AWS region.
# `CACHE_S3_REGION` in env. Default is "us-east-1"
region: "us-east-1"
# AWS access key.
# If provided along with secretKey, will be used for authentication.
# If not provided, will use the default AWS credential chain.
# `CACHE_S3_ACCESS_KEY` in env.
accessKey: ""
# AWS secret key.
# If provided along with accessKey, will be used for authentication.
# If not provided, will use the default AWS credential chain.
# `CACHE_S3_SECRET_KEY` in env.
secretKey: ""
proxy:
# Proxy URL to send Discord requests to.
# `PROXY_URL` in env
url: "http://127.0.0.1:10808"
logger:
# Logger format preset. Must be either `prod`, `dev`, `gcp` (GCP Cloud Logging format)
# `LOGGER_PRESET` in env.
preset: "prod"
customUpload:
# Maximum upload size in bytes.
# `CUSTOM_MAX_UPLOAD_SIZE` in env. Default is 5242880 (5MB)
maxUploadSize: 5242880
# Maximum image size in pixels.
# `CUSTOM_MAX_PIXEL_COUNT` in env. Default is 1000000 (1 MP)
maxPixelCount: 1000000