-
Notifications
You must be signed in to change notification settings - Fork 0
/
fylr.yml
322 lines (304 loc) · 9.91 KB
/
fylr.yml
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
fylr:
externalURL: "https://EXAMPLE.COM"
name: "EXAMPLE"
encryptionKey: "EXAMPLE5cca29f8ddec415fd80bdbe25"
debug:
skipTerms: false
logger:
noColor: true
level: info
timeFormat: "2006-01-02T15:04:05Z07:00"
db:
driver: "postgres"
dsn: "postgres://fylr:fylr@postgresql:5432/fylr?sslmode=disable"
maxOpenConns: 0
maxIdleConns: 10
# The init block is used to pre-fill the database when its created or purged.
init:
# Path to base config file. If set, on a fresh install or after a purge this
# file is used and preloaded into the base config. The format of the file is
# JSON in API format. Defaults to "", which starts with an empty base
# config. The empty base config uses defaults which are defined in
# resources/baseconfig/baseconfig.yml. Unset keys (from a partial base
# config file), are set to their defaults.
configFile: ""
# Inline base config. Works like configFile but used the inlined
# baseconfig setting in this .yml file. Runs after configFile, so everything
# in config overwrites settings from configFile. Default is empty.
config:
system:
config:
purge:
allow_purge: true
purge_storage: false
location_defaults:
originals: assets
versions: assets
backups: backups
# preconfigure locations for empty databases
locations:
# the location's name can be any string which you choose
#
# Inside the storage location fylr will create a structure like this:
#
# [prefix/]fylr-UUID/originals
# [prefix/]fylr-UUID/versions
# [prefix/]fylr-UUID/backups
assets:
# The kind is either "file" or "s3" (see below)
kind: file
# Each location can configure a prefix which will
# be attached before the file to be created
prefix: ""
# Set to true if files in this location can be
# purged by FYLR (if the purge api call is used)
allow_purge: false
config:
file:
# keep in mind: this is a path inside of the container
dir: "/srv"
backups:
# The kind is either "file" or "s3" (see below)
kind: file
# Each location can configure a prefix which will
# be attached before the file to be created
prefix: ""
# Set to true if files in this location can be
# purged by FYLR (if the purge api call is used)
allow_purge: false
config:
file:
# keep in mind: this is a path inside of the container
dir: "/fylr/files/backups"
elastic:
addresses:
- "http://elasticsearch:9200"
parallel: 4
maxMem: 100mb
objectsPerJob: 1000
execserver:
parallel: 2
pluginJobTimeoutSec: 240
connectTimeoutSec: 120
addresses:
- http://fylr.localhost:8070/?pretty=true
callbackBackendInternalURL: "http://fylr.localhost:8082"
callbackApiInternalURL: "http://fylr.localhost:8081"
plugin:
paths:
- "/fylr/files/plugins/easydb"
- "/fylr/files/plugins/fylr"
#urls:
#- https://github.com/programmfabrik/fylr-plugin-formula-columns/releases/download/v0.1.2/fylr-plugin-formula-columns.zip
# the following is used initially only (during first start and after purge)
# This is configured as map with the plugin name as key.
defaults:
# default for fylr_example plugin
fylr_example:
# enable, set to false to disable the plugin, defaults to true
enabled: false
# update_policy: automatic, always, never, defaults to automatic
update_policy: never
example-plugin:
enabled: false
update_policy: never
allowpurge: true
resources: "/fylr/files/resources"
services:
webapp:
addr: ":443"
reverseProxy:
api: "http://fylr.localhost:8081"
backend: "http://fylr.localhost:8082"
path: "/fylr/files/webfrontend"
oauth2:
clientID: web-client
clientSecret: EXAMPLE
tls:
letsEncrypt:
email: you@EXAMPLE.COM
forwardHttpAddr: ":80"
useStagingCA: false
api:
addr: ":8081"
oauth2Server:
# This secret is used to sign authorize codes, access and refresh
# tokens. If unset, a random string is used. If multiple fylr server are
# serving the same instance, the signingSecret needs to be configured.
# If not configured, each container recreation results in new tokens.
# The format is a string of exactly 32 byte length.
signingSecret: EXAMPLE8901234567890123456789023
clients:
# key in next line = value of fylr.services.webapp.oauth.clientID
web-client:
# Fill in the value of fylr.services.webapp.oauth.clientSecrets
# in the next line instead of EXAMPLE and execute it
# htpasswd -nbBC 10 "" EXAMPLE | tr -d ':\n'; echo
# if you do not have htpasswd somewhere to execute once,
# you can install it by (e.g. under ubuntu): apt install apache2-utils
# use the resulting string as secret in the following line:
secret: $2y$16$EXAMPLEEXAMPLEEXAMPLEuZP8DPshwAda7T99GhLLqff8KyGYvZ4K
redirectURIs:
- https://EXAMPLE.COM/oauth2/callback
scopes: ["read", "write", "offline"]
app-client:
clientID: app-client
secret: $2y$12$vHCyS42d0RpICdKoXKP0J.w1cschxjf.Ln43I9NYyl1u0W7vevjQS
redirectURIs:
- fylr.app.scheme:///
scopes: ["read", "write", "offline"]
backend:
addr: ":8082"
inspect:
backup:
path: /tmp/fylrctrl
fylrctl: fylrctl
psql: psql
sqlite3: sqlite3
execserver:
addr: ":8070"
tempDir: /tmp/fylr
waitgroups:
a:
processes: 6
b:
processes: 4
c:
processes: 6
services:
python3:
waitgroup: b
commands:
python3:
prog: "python3"
node:
waitgroup: b
commands:
node:
prog: "node"
convert:
waitgroup: a
commands:
convert:
prog: "convert"
env:
- "OMP_NUM_THREADS=2"
startupCheck:
args:
- "-version"
regex: "Version: ImageMagick 7..*?https://imagemagick.org"
composite:
prog: "composite"
env:
- "OMP_NUM_THREADS=2"
startupCheck:
args:
- "-version"
regex: "Version: ImageMagick 7..*?https://imagemagick.org"
fylr_metadata:
prog: "fylr_metadata"
ffmpeg:
waitgroup: a
commands:
ffmpeg:
prog: ffmpeg
startupCheck:
args:
- "-version"
regex: "ffmpeg version 5[\\.0-9]+ Copyright"
convert:
prog: "convert"
env:
- "OMP_NUM_THREADS=2"
startupCheck:
args:
- "-version"
regex: "Version: ImageMagick 7..*?https://imagemagick.org"
composite:
prog: "composite"
env:
- "OMP_NUM_THREADS=2"
startupCheck:
args:
- "-version"
regex: "Version: ImageMagick 7..*?https://imagemagick.org"
ffprobe:
prog: ffprobe
startupCheck:
args:
- "-version"
regex: "ffprobe version 5[\\.0-9]+ Copyright"
ffmpegthumbnailer:
prog: ffmpegthumbnailer
startupCheck:
args:
- "-v"
regex: "ffmpegthumbnailer version: 2\\..*"
fylr_metadata:
prog: "fylr_metadata"
soffice:
waitgroup: c
commands:
soffice:
prog: soffice
startupCheck:
args:
- "--headless"
- "--invisible"
- "--version"
regex: "LibreOffice 7[.0-9]+"
convert:
prog: "convert"
env:
- "OMP_NUM_THREADS=2"
startupCheck:
args:
- "-version"
regex: "Version: ImageMagick 7..*?https://imagemagick.org"
composite:
prog: "composite"
env:
- "OMP_NUM_THREADS=2"
startupCheck:
args:
- "-version"
regex: "Version: ImageMagick 7..*?https://imagemagick.org"
fylr_metadata:
prog: "fylr_metadata"
pdf2pages:
waitgroup: a
commands:
fylr_pdf2pages:
prog: "fylr_pdf2pages"
fylr_metadata:
prog: "fylr_metadata"
xslt:
waitgroup: a
commands:
xsltproc:
prog: "xsltproc"
copy:
waitgroup: a
commands:
fylr_copy:
prog: "fylr_copy"
iiif:
waitgroup: a
commands:
fylr_iiif:
prog: "fylr_iiif"
startupCheck:
args:
- "-version"
regex: "Version v*"
metadata:
waitgroup: a
commands:
fylr_metadata:
prog: "fylr_metadata"
ffprobe:
prog: ffprobe
startupCheck:
args:
- "-version"
regex: "ffprobe version 5[\\.0-9]+ Copyright"