-
Notifications
You must be signed in to change notification settings - Fork 0
/
cantaloupe.properties.prod
616 lines (478 loc) · 22.1 KB
/
cantaloupe.properties.prod
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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
###########################################################################
# Cantaloupe configuration file for production environment
###########################################################################
# !! Leave blank to use the JVM default temporary directory.
temp_pathname = tmp/
# !! Configures the HTTP server. (Standalone mode only.)
http.enabled = true
http.host = 0.0.0.0
http.port = 8182
http.http2.enabled = false
# !! Configures the HTTPS server. (Standalone mode only.)
https.enabled = false
https.host = 0.0.0.0
https.port = 8183
# Secure HTTP/2 requires Java 9 or later.
https.http2.enabled = false
# !! Available values are `JKS` and `PKCS12`. (Standalone mode only.)
https.key_store_type = JKS
https.key_store_password = myPassword
#https.key_store_path = /path/to/keystore.jks
https.key_password = myPassword
# !! Constrains the size of the web server's thread pool. Leave blank to
# use the defaults.
http.min_threads =
http.max_threads =
# !! Maximum size of the HTTP(S) request queue. Leave blank to use the
# default.
http.accept_queue_limit =
# Base URI to use for internal links, such as Link headers and JSON-LD
# @id values, in a reverse-proxy context. This should only be used when
# X-Forwarded-* headers cannot be used instead. (See the user manual.)
base_uri = https://iiif.nypl.org
# Normally, slashes in a URI path component must be percent-encoded as
# "%2F". If your proxy is not able to pass these through without decoding,
# you can define an alternate character or character sequence to substitute
# for a slash. Supply the non-percent-encoded version here, and use the
# percent-encoded version in URLs.
slash_substitute =
# Maximum number of pixels to return in a response, to prevent overloading
# the server. Requests for more pixels than this will receive an error
# response. Set to 0 for no maximum.
max_pixels = 400000000
max_scale = 1000.0
# A meta-identifier is a superset of an identifier that includes other
# information like a page number and/or scale constraint. A meta-identifier
# transformer transforms a meta-identifier to and from a string in a URI
# path component.
# Available transformers include `StandardMetaIdentifierTransformer` and
# `DelegateMetaIdentifierTransformer`. See the user manual for more
# information about meta-identifiers and these options.
meta_identifier.transformer = StandardMetaIdentifierTransformer
# Character sequence that separates the components of a meta-identifier in
# the identifier portion of a URI.
meta_identifier.transformer.StandardMetaIdentifierTransformer.delimiter = ;
# If true, HTTP >= 400-level responses are logged at WARN and ERROR level.
# This may result in multiple log statements for the same error, but it may
# also help diagnose errors that have evaded logging.
log_error_responses = false
# Errors will also be logged to the error log (if enabled).
print_stack_trace_on_error_pages = true
###########################################################################
# DELEGATE SCRIPT
###########################################################################
# Enables the delegate script: a Ruby script containing various delegate
# methods. (See the user manual.)
delegate_script.enabled = true
# !! This can be an absolute path, or a filename; if only a filename is
# specified, it will be searched for in the same folder as this file, and
# then the current working directory.
delegate_script.pathname = delegates.rb
###########################################################################
# ENDPOINTS
###########################################################################
# !! Configures HTTP Basic authentication in all public endpoints.
endpoint.public.auth.basic.enabled = false
endpoint.public.auth.basic.username = myself
endpoint.public.auth.basic.secret = mypassword
# Enables the IIIF Image API 1.x endpoint, at /iiif/1.
endpoint.iiif.1.enabled = false
# Enables the IIIF Image API 2.x endpoint, at /iiif/2.
endpoint.iiif.2.enabled = true
# Enables the IIIF Image API 3.x endpoint, at /iiif/3.
endpoint.iiif.3.enabled = true
# Minimum size that will be used in info.json `sizes` keys.
endpoint.iiif.min_size = 64
# Minimum size that will be used in info.json `tiles` keys. The user manual
# explains how these are calculated.
endpoint.iiif.min_tile_size = 512
# If true, requests for sizes other than those contained in an information
# response will be denied.
endpoint.iiif.2.restrict_to_sizes = false
# Enables the Control Panel, at /admin.
endpoint.admin.enabled = false
endpoint.admin.username = admin
endpoint.admin.secret = secret
# Enables the administrative HTTP API. (See the user manual.)
endpoint.api.enabled = false
# HTTP Basic credentials to access the HTTP API.
endpoint.api.username = admin
endpoint.api.secret = secret
# If true, sources and caches will be checked, resulting in a more robust
# but slower health check. Set this to false if these services already have
# their own health checks.
endpoint.health.dependency_check = false
###########################################################################
# SOURCES
###########################################################################
# Uses one source for all requests. Available values are `FilesystemSource`,
# `HttpSource`, `JdbcSource`, `S3Source`, and `AzureStorageSource`.
source.static = FilesystemSource
# If true, `source.static` will be overridden, and the `source()` delegate
# method will be used to select a source per-request.
source.delegate = false
#----------------------------------------
# FilesystemSource
#----------------------------------------
# How to look up files. Allowed values are `BasicLookupStrategy` and
# `ScriptLookupStrategy`. ScriptLookupStrategy uses the delegate script for
# dynamic lookups; see the user manual.
FilesystemSource.lookup_strategy = ScriptLookupStrategy
# Server-side path that will be prefixed to the identifier in the URL.
# Trailing slash is important!
FilesystemSource.BasicLookupStrategy.path_prefix = /var/www/images.nypl.org/
# Server-side path or extension that will be suffixed to the identifier in
# the URL.
FilesystemSource.BasicLookupStrategy.path_suffix =
###########################################################################
# PROCESSORS
###########################################################################
#----------------------------------------
# Processor Selection
#----------------------------------------
# * If set to `AutomaticSelectionStrategy`, a "best" available processor
# will be selected per-request based on formats and installed
# dependencies.
# * If set to `ManualSelectionStrategy`, a processor will be chosen based
# on the rest of the keys in this section.
processor.selection_strategy = ManualSelectionStrategy
# Built-in processors are `Java2dProcessor`, TurboJpegProcessor`,
# `KakaduNativeProcessor`, `OpenJpegProcessor`, `GrokProcessor`,`JaiProcessor`,
# `PdfBoxProcessor`, and `FfmpegProcessor`.
# Some of these have third-party dependencies and won't work out-of-the-box.
# These extension-specific definitions are optional.
#processor.avi = FfmpegProcessor
#processor.bmp = GraphicsMagickProcessor
#processor.dcm = ImageMagickProcessor
#processor.flv = FfmpegProcessor
#processor.gif = GraphicsMagickProcessor
#processor.jp2 = KakaduDemoProcessor
#processor.jpg = GraphicsMagickProcessor
#processor.mov = FfmpegProcessor
#processor.mp4 = FfmpegProcessor
#processor.mpg = FfmpegProcessor
#processor.pdf = PdfBoxProcessor
#processor.png = GraphicsMagickProcessor
#processor.tif = ImageMagickProcessor
#processor.webm = FfmpegProcessor
#processor.webp = ImageMagickProcessor
# Fall back to this processor for any formats not assigned above.
#processor.fallback = Java2dProcessor
processor.ManualSelectionStrategy.jp2 = OpenJpegProcessor
processor.ManualSelectionStrategy.fallback = Java2dProcessor
processor.ManualSelectionStrategy.xpm =
#----------------------------------------
# Global Processor Configuration
#----------------------------------------
# Controls how content is fed to processors from stream-based sources.
# * `StreamStrategy` will try to stream a source image from a source when
# possible, and use `processor.fallback_retrieval_strategy` otherwise.
# * `DownloadStrategy` will download it to a temporary file, and delete
# it after the request is complete.
# * `CacheStrategy` will download it into the source cache using
# FilesystemCache, which must also be configured. (This will perform a
# lot better than DownloadStrategy if you can spare the disk space.)
processor.stream_retrieval_strategy = CacheStrategy
# Controls how an incompatible StreamSource + FileProcessor combination is
# dealt with.
# * `DownloadStrategy` and `CacheStrategy` work the same as above.
# * `AbortStrategy` causes the request to fail.
processor.fallback_retrieval_strategy = DownloadStrategy
# Resolution of vector rasterization (of e.g. PDFs) at a scale of 1.
processor.dpi = 150
# Expands contrast to utilize available dynamic range. This usually requires
# the whole source image to be read into memory, so it can be inefficient.
processor.normalize = false
# Color of the background when an image is rotated or alpha-flattened, for
# output formats that don't support transparency.
# This may not be respected for indexed color derivative images.
processor.background_color = white
# Available values are `bell`, `bspline`, `bicubic`, `box`, `hermite`,
# `lanczos3`, `mitchell`, `triangle`. (JaiProcessor & KakaduNativeProcessor
# ignore these.)
processor.downscale_filter = bicubic
processor.upscale_filter = bicubic
# If true, images are downscaled in a linear color space, which is more
# accurate. This only works with mono-resolution (non-pyramidal) images. It
# also may impair performance.
processor.downscale_linear = false
# Intensity of an unsharp mask from 0 to 1.
processor.sharpen = 0
# Progressive JPEGs are usually more compact.
processor.jpg.progressive = true
# JPEG output quality (1-100).
processor.jpg.quality = 80
# TIFF output compression type. Available values are `Deflate`, `JPEG`,
# `LZW`, and `RLE`. Leave blank for no compression.
processor.tif.compression = LZW
#----------------------------------------
# ImageIO Plugin Preferences
#----------------------------------------
# These override the default plugins used by the application and should not
# normally be changed.
processor.imageio.bmp.reader =
processor.imageio.gif.reader =
processor.imageio.gif.writer =
processor.imageio.jpg.reader =
processor.imageio.jpg.writer =
processor.imageio.png.reader =
processor.imageio.png.writer =
processor.imageio.tif.reader =
processor.imageio.tif.writer =
processor.imageio.xpm.reader =
#----------------------------------------
# FfmpegProcessor
#----------------------------------------
# Optional absolute path of the directory containing the FFmpeg binaries.
# Overrides the PATH.
FfmpegProcessor.path_to_binaries =
#----------------------------------------
# OpenJpegProcessor
#----------------------------------------
# Optional absolute path of the directory containing opj_decompress.
# Overrides the PATH.
OpenJpegProcessor.path_to_binaries = /usr/bin
#----------------------------------------
# GrokProcessor
#----------------------------------------
# Optional absolute path of the directory containing grk_decompress.
# Overrides the PATH.
GrokProcessor.path_to_binaries =
#----------------------------------------
# PdfBoxProcessor
#----------------------------------------
# The following will enable disk to be used as well as memory during
# PDF loading in PdfBoxProcessor. If `max_memory_bytes` is -1 it
# will use unlimited memory.
processor.pdf.scratch_file_enabled = false
processor.pdf.max_memory_bytes = -1
###########################################################################
# CLIENT-SIDE CACHING
###########################################################################
# Whether to enable the response Cache-Control header.
cache.client.enabled = true
cache.client.max_age = 31536000
cache.client.shared_max_age =
cache.client.public = true
cache.client.private = false
cache.client.no_cache = false
cache.client.no_store = false
cache.client.must_revalidate = true
cache.client.proxy_revalidate = false
cache.client.no_transform = true
###########################################################################
# SERVER-SIDE CACHING
###########################################################################
# N.B.: The source cache may be used if the
# `processor.stream_retrieval_strategy` and/or
# `processor.fallback_retrieval_strategy` keys are set to `CacheStrategy`.
# FilesystemCache is the only available source cache.
cache.server.source = FilesystemCache
# Amount of time source cache content remains valid. Set to blank or 0
# for forever.
cache.server.source.ttl_seconds = 2592000
# Enables the derivative (processed image) cache.
cache.server.derivative.enabled = true
# Available values are `FilesystemCache`, `JdbcCache`, `RedisCache`,
# `HeapCache`, `S3Cache`, and `AzureStorageCache`.
cache.server.derivative = FilesystemCache
# Amount of time derivative cache content remains valid. Set to blank or 0
# for forever.
cache.server.derivative.ttl_seconds = 2592000
# Whether to use the Java heap as a "level 1" cache for image infos, either
# independently or in front of a "level 2" derivative cache (if enabled).
cache.server.info.enabled = true
# If true, when a source reports that the requested source image has gone
# missing, all cached information relating to it (if any) will be deleted.
# (This is effectively always false when cache.server.resolve_first is also
# false.)
cache.server.purge_missing = true
# If true, the source image will be confirmed to exist before a cached copy
# is returned. If false, the cached copy will be returned without checking.
# Resolving first is safer but slower.
cache.server.resolve_first = true
# !! Enables the cache worker, which periodically purges invalid cache
# items in the background.
cache.server.worker.enabled = true
# !! The cache worker will wait this many seconds before starting its
# next shift.
cache.server.worker.interval = 86400
#----------------------------------------
# FilesystemCache
#----------------------------------------
# If this directory does not exist, it will be created automatically.
FilesystemCache.pathname = /ifs/prod/iiif-imagecache
#FilesystemCache.pathname = /var/www/images.nypl.org/cache
# Levels of folder hierarchy in which to store cached images. Deeper depth
# results in fewer files per directory. Set to 0 to disable subdirectories.
# Purge the cache after changing this.
FilesystemCache.dir.depth = 3
# Number of characters in tree directory names. Should be set to
# 16^n < (max number of directory entries your filesystem can deal with).
# Purge the cache after changing this.
FilesystemCache.dir.name_length = 2
#----------------------------------------
# HeapCache
#----------------------------------------
# Target cache size, in bytes or a number ending in M, MB, G, GB, etc.
# This is not a hard limit, and may be transiently exceeded.
# Ensure your heap can accommodate this size.
HeapCache.target_size = 2G
# If true, the cache contents will be written to a file on exit and during
# cache worker shifts, and read back in at startup.
HeapCache.persist = false
# When the contents are persisted, this specifies the location of the cache
# file. If the parent directory does not exist, it will be created
# automatically.
HeapCache.persist.filesystem.pathname = /var/cache/cantaloupe/heap.cache
#----------------------------------------
# JdbcCache
#----------------------------------------
# !!
JdbcCache.url = jdbc:postgresql://localhost:5432/cantaloupe
# !!
JdbcCache.user = postgres
# !!
JdbcCache.password =
# !! Connection timeout in seconds.
JdbcCache.connection_timeout = 10
# These must be created manually; see the user manual.
JdbcCache.derivative_image_table = derivative_cache
JdbcCache.info_table = info_cache
#----------------------------------------
# S3Cache
#----------------------------------------
# !! Endpoint URI.
# For AWS endpoints, see:
# https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
S3Cache.endpoint =
# !! AWS region. Only needed for AWS endpoints.
S3Cache.region =
# !! Credentials for your AWS account.
# See: http://aws.amazon.com/security-credentials
# Note that this info can be obtained from elsewhere rather than setting it
# here; see the user manual.
S3Cache.access_key_id =
S3Cache.secret_key =
# !! Name of a bucket to use to hold cached data.
S3Cache.bucket.name =
# !! String that will be prefixed to object keys.
S3Cache.object_key_prefix =
#----------------------------------------
# AzureStorageCache
#----------------------------------------
# !! Credentials for your Azure account.
AzureStorageCache.account_name =
AzureStorageCache.account_key =
# !! Name of the container containing cached images.
AzureStorageCache.container_name =
# !! String that will be prefixed to object keys.
AzureStorageCache.object_key_prefix =
#----------------------------------------
# RedisCache
#----------------------------------------
# !! Redis connection info.
RedisCache.host = localhost
RedisCache.port = 6379
RedisCache.ssl = false
RedisCache.password =
RedisCache.database = 0
###########################################################################
# OVERLAYS
###########################################################################
# Whether to enable overlays.
overlays.BasicStrategy.enabled = false
# Controls how overlays are configured. `BasicStrategy` will use the
# `overlays.BasicStrategy.*` keys in this section. `ScriptStrategy` will
# use a delegate method. (See the user manual.)
overlays.strategy = BasicStrategy
# `image` or `string`.
overlays.BasicStrategy.type = image
# Absolute path or URL of the overlay image. Must be a PNG file.
overlays.BasicStrategy.image = /path/to/overlay.png
# Overlay text.
overlays.BasicStrategy.string = Copyright \u00A9️ My Great Organization\nAll rights reserved.
# For possible values, launch with the -Dcantaloupe.list_fonts option.
overlays.BasicStrategy.string.font = Helvetica
# Font size in points.
overlays.BasicStrategy.string.font.size = 24
# If the string doesn't fit in the image at the above size, the largest size
# at which it does fit will be used, down to this.
overlays.BasicStrategy.string.font.min_size = 18
# Font weight. 1 = regular, 2 = bold. Unfortunately, many fonts don't
# support fractional weights.
overlays.BasicStrategy.string.font.weight = 1.0
# Point spacing between glyphs, typically between -0.1 and 0.1.
overlays.BasicStrategy.string.glyph_spacing = 0.02
# CSS color syntax is supported.
overlays.BasicStrategy.string.color = white
# CSS color syntax is supported.
overlays.BasicStrategy.string.stroke.color = black
# Stroke width in pixels.
overlays.BasicStrategy.string.stroke.width = 1
# Color of a rectangular background to draw under the string.
# CSS color syntax and alpha are supported.
overlays.BasicStrategy.string.background.color = rgba(0, 0, 0, 100)
# Allowed values: `top left`, `top center`, `top right`, `left center`,
# `center`, `right center`, `bottom left`, `bottom center`, `bottom right`.
overlays.BasicStrategy.position = bottom right
# Pixel margin between the overlay and the image edge.
overlays.BasicStrategy.inset = 10
# Output images less than this many pixels wide will not receive an overlay.
# Set to 0 to add the overlay regardless.
overlays.BasicStrategy.output_width_threshold = 400
# Output images less than this many pixels tall will not receive an overlay.
# Set to 0 to add the overlay regardless.
overlays.BasicStrategy.output_height_threshold = 300
###########################################################################
# LOGGING
###########################################################################
#----------------------------------------
# Application Log
#----------------------------------------
# `trace`, `debug`, `info`, `warn`, `error`, `all`, or `off`
log.application.level = info
log.application.ConsoleAppender.enabled = true
log.application.ConsoleAppender.logstash.enabled = false
log.application.FileAppender.logstash.enabled = false
log.application.RollingFileAppender.enabled = true
log.application.RollingFileAppender.logstash.enabled = false
log.application.RollingFileAppender.pathname = log/cantaloupe-application.log
log.application.RollingFileAppender.policy = TimeBasedRollingPolicy
log.application.RollingFileAppender.TimeBasedRollingPolicy.filename_pattern = log/cantaloupe-application-%d{yyyy-MM-dd}.log
log.application.RollingFileAppender.TimeBasedRollingPolicy.max_history = 30
# See the "SyslogAppender" section for a list of facilities:
# http://logback.qos.ch/manual/appenders.html
log.application.SyslogAppender.enabled = false
log.application.SyslogAppender.host =
log.application.SyslogAppender.port = 514
log.application.SyslogAppender.facility = LOCAL0
#----------------------------------------
# Error Log
#----------------------------------------
# Application log messages with a severity of WARN or greater can be copied
# into a dedicated error log, which may make them easier to spot.
log.error.FileAppender.logstash.enabled = false
log.error.RollingFileAppender.enabled = true
log.error.RollingFileAppender.logstash.enabled = false
log.error.RollingFileAppender.pathname = log/cantaloupe-error.log
log.error.RollingFileAppender.policy = TimeBasedRollingPolicy
log.error.RollingFileAppender.TimeBasedRollingPolicy.filename_pattern = log/cantaloupe-error-%d{yyyy-MM-dd}.log
log.error.RollingFileAppender.TimeBasedRollingPolicy.max_history = 30
#----------------------------------------
# Access Log
#----------------------------------------
log.access.ConsoleAppender.enabled = false
# RollingFileAppender is an alternative to using something like
# FileAppender + logrotate.
log.access.RollingFileAppender.enabled = true
log.access.RollingFileAppender.pathname = log/cantaloupe-access.log
log.access.RollingFileAppender.policy = TimeBasedRollingPolicy
log.access.RollingFileAppender.TimeBasedRollingPolicy.filename_pattern = log/cantaloupe-access-%d{yyyy-MM-dd}.log
log.access.RollingFileAppender.TimeBasedRollingPolicy.max_history = 30
# See the "SyslogAppender" section for a list of facilities:
# http://logback.qos.ch/manual/appenders.html
log.access.SyslogAppender.enabled = false
log.access.SyslogAppender.host =
log.access.SyslogAppender.port = 514
log.access.SyslogAppender.facility = LOCAL0