-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkimg.yaml
254 lines (212 loc) · 4.5 KB
/
kimg.yaml
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
#
# Kimg Configuration File
#
#
# Kimg Web Server Configuration.
#
httpd:
# Kimg web server bind address for listen.
#
# ENV KIMG_HTTPD_BIND
bind: 0.0.0.0:80
# Kimg web server url.
#
# ENV KIMG_HTTPD_URL
url:
# Http headers set on image fetch response.
#
# ENV KIMG_HTTPD_HEADERS
headers:
Server: kimg
# Http header etag option.
# When set true, get files not modified will return 304
#
# ENV KIMG_HTTPD_ETAG
etag: true
# Http header max-age option.
# Cache time of browser, default value is 7776000s (90days)
#
# ENV KIMG_HTTPD_MAX_AGE
maxAge: 7776000
# Http item name in upload form.
#
# ENV KIMG_HTTPD_FORM_NAME
formName: file
# The max size of image data allowed upload.
#
# ENV KIMG_HTTPD_MAX_SIZE
maxSize: 104857600 #100*1024*1024
# Whether serve www web root.
#
# ENV KIMG_HTTPD_ENABLE_WEB
enableWeb: true
#
# Kimg Logger Configuration.
#
logger:
# The mode of logger. maybe "console" or "file".
#
# ENV KIMG_LOGGER_MODE
mode: console
# The log level filter option. maybe "debug", "info", "warn" or "error".
#
# ENV KIMG_LOGGER_LEVEL
level: debug
# The log file path for logger mode "file".
#
# ENV KIMG_LOGGER_FILE
file: kimg.log
#
# Kimg Image Process Configuration.
#
image:
# The default image format saved, "none" for original or other supported format.
#
# ENV KIMG_IMAGE_FORMAT
format: jpeg
# The default image quality value, 1 ~ 100 (default: 75).
#
# ENV KIMG_IMAGE_QUALITY
quality: 75
# The image format allowed serve.
#
# ENV KIMG_IMAGE_ALLOWED_TYPES
allowedTypes:
- jpeg
- jpg
- png
- gif
- webp
#
# Kimg Cache Server Configuration.
#
cache:
# The mode of cache. maybe "none", "memory", "memcache" or "redis".
#
# ENV KIMG_CACHE_MODE
mode: memory
# The max size of image data cached.
#
# ENV KIMG_CACHE_MAX_SIZE
maxSize: 1048576 #1024*1024
memcache:
# The url of memcached server.
#
# ENV KIMG_CACHE_MEMCACHE_URL
url: 127.0.0.1:11211
redis:
# The url of redis server.
#
# ENV KIMG_CACHE_REDIS_URL
host: 127.0.0.1:6379
memory:
# The max size memory set for memory cache.
#
# ENV KIMG_CACHE_MEMORY_CAPACITY
capacity: 104857600 #100*1024*1024
#
# Kimg Image Storage Configuration.
#
storage:
# The mode of storage. maybe "file", "minio".
#
# ENV KIMG_STORAGE_MODE
mode: file
# The option indicate whether save all request images.
#
# ENV KIMG_STORAGE_SAVE_NEW
saveNew: true
file:
# The directory path for storage images on mode "file".
#
# ENV KIMG_STORAGE_FILE_ROOT
root: kimgs
minio:
# The endpoint of minio.
#
# ENV KIMG_STORAGE_MINIO_ENDPOINT
endpoint: 127.0.0.1:9000
# The accessKeyID of minio.
#
# ENV KIMG_STORAGE_MINIO_ACCESSKEYID
accessKeyId: minioadmin
# The secretAccessKey of minio.
#
# ENV KIMG_STORAGE_MINIO_SECRETACCESSKEY
secretAccessKey: minioadmin
# The bucket of minio
#
# ENV KIMG_STORAGE_MINIO_BUCKET
bucket: kimgs
# Whether use ssl with minio
#
# ENV KIMG_STORAGE_MINIO_USESSL
useSSL: false
#
# Kimg WaterMark Configuration.
#
watermark:
# Whether or not to process watermark.
#
# ENV KIMG_WATERMARK_ENABLE
enable: true
# Gravity of watermark.
#
# ENV KIMG_WATERMARK_GRAVITY
gravity: se
# X of watermark.
#
# ENV KIMG_WATERMARK_X
x: 0
# Y of watermark.
#
# ENV KIMG_WATERMARK_Y
y: 0
# Rotate of watermark.
#
# ENV KIMG_WATERMARK_ROTATE
rotate: 0
# Opacity of watermark.
#
# ENV KIMG_WATERMARK_OPACITY
opacity: 100
# Text WaterMark Configuration.
text:
# Text of watermark.
#
# ENV KIMG_WATERMARK_TEXT_CONTENT
content: kimg
# Text Font Name of watermark.
#
# ENV KIMG_WATERMARK_TEXT_FONT_NAME
fontName: arial.ttf
# Text Font Size of watermark.
#
# ENV KIMG_WATERMARK_TEXT_FONT_SIZE
fontSize: 32
# Text Font Color of watermark.
#
# ENV KIMG_WATERMARK_TEXT_FONT_COLOR
fontColor: #ec6952
# Text Stroke Color of watermark.
#
# ENV KIMG_WATERMARK_TEXT_STROKE_COLOR
strokeColor: #ff0000
# Text Stroke Width of watermark.
#
# ENV KIMG_WATERMARK_TEXT_STROKE_WIDTH
strokeWidth: 2
# Logo WaterMark Configuration.
logo:
# Logo file of watermark.
#
# ENV KIMG_WATERMARK_LOGO_FILE
file:
# Logo Width of watermark.
#
# ENV KIMG_WATERMARK_LOGO_W
w: 60
# Logo Height of watermark.
#
# ENV KIMG_WATERMARK_LOGO_H
h: 60