sample_config.application.properties.template Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gallery-api Show documentation
Show all versions of gallery-api Show documentation
REST Webapp in Java for viewing a gallery of images and videos. Image rescaling as well as video transcoding is performed based on request parameters. No UI included. Purely API-based. Authentication via HTTP basic auth (per default). Supports different user roles.
###############################################################################
# ENVIRONMENT-SPECIFIC (MOSTLY REQUIRED) CONFIG
###############################################################################
# This is where resized images and converted videos will be stored.
gallery.resizeDir=/full/path/to/resize-dir
# Properties file with user, group and password info for Spring security.
# See separate template for more details.
gallery.users.propertiesFile=/full/path/to/gallery-config/gallery-users.properties
# This should point to the properties file that defines the authorization
# mapping between user groups and directories.
# See separate template for more details.
gallery.groupDirAuth.propertiesFile=/full/path/to/gallery-config/gallery-auth-dirs.properties
# This should point to the binary used for video conversion, for instance
# avconv or ffmpeg. Either just the name or the full path can be entered,
# depending on the environment.
gallery.videoConversion.binary=/full/path/to/ffmpeg/bin/ffmpeg.exe
#gallery.videoConversion.binary=avconv
# Writes all videos that could not successfully be converted. Once on the list,
# no further attempt will be made to convert that video.
gallery.videoConversion.blacklistedVideosFile=/full/path/to/gallery-config/gallery-black-listed-videos.txt
###############################################################################
# OPTIONAL CONFIG WITH DEFAULTS
###############################################################################
# Defines whether user-defined images sizes should be allowed per request. If
# false, only specific image formats are allowed.
gallery.allowCustomImageSizes=false
# If true, listing responses will contain images and videos separately.
# If false, images and videos will be returned mixed in the media attribute.
gallery.separateImagesAndVideos=false
# Comma-separated list of allowed image and video formats. Case doesn't matter.
gallery.allowedFileExtensions=jpeg,jpg,png,gif,mp4
# Defines the allowed image formats. Multiple formats can be specified by list
# notation. Each format has three properties: code, width and height.
# Example:
# gallery.image-formats[0].code=uhd
# gallery.image-formats[0].width=3840
# gallery.image-formats[0].height=2160
gallery.image-formats[0].code=uhd
gallery.image-formats[0].width=3840
gallery.image-formats[0].height=2160
gallery.image-formats[1].code=qhd
gallery.image-formats[1].width=2560
gallery.image-formats[1].height=1440
gallery.image-formats[2].code=fullhd
gallery.image-formats[2].width=1920
gallery.image-formats[2].height=1080
gallery.image-formats[3].code=thumb
gallery.image-formats[3].width=300
gallery.image-formats[3].height=300
# A map of video conversion modes, where the last part of the property name
# denotes the name of the conversion mode itself. Multiple modes can be listed.
# The value is a template for the external execution of the video format.
# Three parameters will be provided as substitution:
# String 1 will be the executable.
# String 2 will be the input file.
# String 3 will be the output file.
#This property has been tested successfully with ffmpeg
gallery.video.conversion-modes.COMPACT=%s,-v,quiet,-i,%s,%s
#The below config has been tested successfully with avconv
#gallery.video.conversion-modes.COMPACT=%s,-i,%s,-strict,experimental,%s
# Template for the external execution of generating a screenshot from a video.
# String 1 will be the executable.
# String 2 will be the input file (video).
# String 3 will be the output file (image).
# String 4 will be the width of the image.
# String 5 will be the height of the image.
gallery.videoConversion.imageCommandTemplate=%1$s,-i,%2$s,-ss,00:00:00.500,-filter:v,scale=%4$s:%5$s,-vframes,1,%3$s
# States how long time in seconds the gallery app will wait for an external
# program to convert one video before aborting the conversion of that video.
gallery.videoConversion.maxWaitTimeSeconds=3600
# Optional. If set, any video conversion call will redirect the error output
# from the external process to the file specified.
gallery.videoConversion.externalProcessErrorLogFile=
# Max pixel sizes of resized images The proportions will always be kept.
gallery.imageResizing.maxImageWidth=5000
gallery.imageResizing.maxImageHeight=5000
# Max age of generated directory images before re-validation towards potential
# new images in directory
gallery.imageResizing.directoryImageMaxAgeMinutes=1440
# This is only needed if ImageResizeServiceIMImpl is used for resizing
#gallery.imageMagickPath=C:/Program Files/ImageMagick-6.9.3-Q16
# States allowed origins for CORS. Relevant if requests are made from sites
# under other domains.
gallery.web.allowedOrigins=*
# Sets the cache header for images and videos. All service requests returning
# JSON are non-cached.
gallery.mediaResourcesCacheHeader=private, no-store, max-age=31536000
###############################################################################
# SPRING BOOT CONFIG
###############################################################################
server.servlet.context-path=/gallery
server.error.whitelabel.enabled=false
# Extra logging can be configured here
#logging.level.root=DEBUG