Skip to content

Configuration

Michal Vala edited this page Dec 12, 2017 · 11 revisions

How to set properties

Configuration can be provided by application.properties file on classpath

# application.properties
box.home=/tmp/test_repository
box.prefix=sftp://my_box_server:

or as command line arguments java -jar -Dbox.home=/tmp/test_repository boxitory-${version}.jar

Configuration options

  • box.home
    • path where to find boxes
    • in example above, it will be set to /tmp/test_repository
    • default value: .
  • box.prefix
    • prefix for the output json, that is prepend before absolute local path of the box
    • do define for example protocol or server, where boxes are placed
    • e.g.: sftp://my_box_server:
    • default value: empty
  • box.sort_desc
    • boolean value true|false
    • when default or false, boxes are sorted by version in ascending order
    • when true, boxes are sorted by version in descending order
    • default value: false
  • box.checksum
    • string value: disabled|md5|sha1|sha256
    • default value: disabled
    • when default or disabled boxes output json not contains properties checksum_type and checksum
    • when md5|sha1|sha256 boxes output json contains properties checksum_type and checksum with coresponding values
  • box.checksum_persist (since v1.3.0)
    • boolean value: true|false
    • when default or true, calculated checksums are persisted and taken in following requests. This is huge performance boost, but first request will be slow.
    • when false, checksums are always calculated on demand for all available boxes
    • default value: true
  • box.version_as_timestamp (since v1.4.0)
    • boolean value: true|false
    • when true, timestamp in box version name is transfered into readable ISO 8601 date time format and prepended to box description. Delimiter is -.
    • Example of printed output in description field: 2017-11-02T13:08:26Z - Box description.
    • default value: false

Advanced Options

  • box.checksum_buffer_size
    • Box file is loaded to this buffer to calculate box checksums
    • default value: 1024
  • box.checksum_ensure
    • non negative integer value
    • number of box versions which always has calculated checksum. Versions are counted from the highest to lowest.
    • when set to 1 then always the newest version has calculated checksum. Others only when checksum is precalculated an stored.
    • default value: 1