Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java -Dfcrepo.home=/data/fedora-home -jar fcrepo-webapp-6.0.0-SNAPSHOT-jetty-console.jar

...

Two ways of  passing configuration:  property file or command-line argument 

Before we enumerate the configurable properties and their defaults it should be noted that there are two ways of passing this configuration to your Fedora instance.  As noted above you can use the -D<param.name>=<param.value> syntax.   Optionally you can pass all the parameters at once by putting them in a java properties file and passing the path of the file as a command line argument.  For example, to pass two parameters at once using a property file,  by file simply create a file with any arbitrary name  and path such as  "my_fcrepo.properties".  Then add your parameters as you would in any Java properties file, like this:

Code Block
# add any number of properties below
fcrepo.home: my_fcrepo_home_directory
fcrepo.autoversioning.enabled: true

Then pass these parameters to Fedora like this: 

Code Block
java -Dfcrepo.config.file=my_fcrepo.properties -jar fcrepo-webapp-6.0.0-SNAPSHOT-jetty-console.jar

IMPORTANT NOTE ON PROPERTY PRECEDENCE

You may pass parameters simultaneously via the command-line params as well as by property file.  However,  please keep in mind that command-line parameter values will overwrite any values defined in your properties file.  So using the above mentioned property file as an example

Code Block
java -Dfcrepo.config.file=my_fcrepo.properties -jar fcrepo-webapp-6.0.0-SNAPSHOT-jetty-console.jar

will have an fcrepo.home value of "my_fcrepo_home_directory"  whereas

Code Block
java -Dfcrepo.home=overridden_fcrepo_home -Dfcrepo.config.file=my_fcrepo.properties -jar fcrepo-webapp-6.0.0-SNAPSHOT-jetty-console.jar

will have an fcrepo.home value of "overridden_fcrepo_home".

Table of Configurable Properties

There are a number of configuration elements that can be optionally be set when starting the Fedora web-application, noted below within brackets: <>. 

...

The path to a properties file containing any property name value pair specified below.  If the file does not exist, Fedora will silently ignore it.   

Important note: if  you create the properties file in the default location (specfied in the next column) know that any definition of fcrepo.home in that file will be ignored.  The fcrepo.home property will be read from the properties file only when the following two conditions are present: 1) you are using the -Dfcrepo.config.file=... option and 2) you have not specified -Dfcrepo.home=...

...

fcrepo.spring.configuration

The  path to the spring configuration.  While it is generally not recommended to use this option,  in some cases you may need to make adjustments to the default spring configuration.   This can be set to a path (relative to the current working directory or absolute) to which Fedora repository content will be written.   

...

This specifies the ports used by the embedded JMS-based message broker for OpenWire protocol. Note: If you have multiple instances of Fedora running,  this property must be set to avoid messaging port conflicts.

...

This specifies the ports used by the embedded JMS-based message broker for STOMP protocol.  Note: If you have multiple instances of Fedora running,  this property must be set to avoid messaging port conflicts.

...

This parameter allows you to set the database connection url.  In general the format is as follows:

Code Block
jdbc:<database_type>://<database_host>:<database_port>/<database_name> 

Fedora currently supports H2, PostgresQL 12.3, MariaDB 10.5.3, and MySQL 8.0

So using the default ports for the supported databases here are the values we typically use: 

...

MariaDB:  jdbc:mariadb://localhost:3306/fcrepo

MySQL:  jdbc:mysql://localhost:3306/fcrepo

...

fcrepo.db.connection.checkout.timeout

...

fcrepo.db.connection.idle.test.period

...

fcrepo.db.connection.test.on.checkout

...

fcrepo.velocity.runtime.log

...

fcrepo.persistence.defaultDigestAlgorithm

...

This sets the default digest algorithm on ingested binary resources.

...

fcrepo.ocfl.reindex.failOnError

...

fcrepo.ocfl.reindex.batchSize

...

fcrepo.ocfl.reindex.threads

...

fcrepo.storage

...

fcrepo.ocfl.s3.bucket

...

fcrepo.ocfl.s3.prefix

...

fcrepo.aws.region

...

fcrepo.aws.access-key

...

fcrepo.aws.secret-key

...