Skip to content

Latest commit

 

History

History
119 lines (93 loc) · 3.3 KB

configuration.rst

File metadata and controls

119 lines (93 loc) · 3.3 KB

Configuration

Configuration file

All configuration variables can be put in file cantharella.conf. This file can be in:

  • classpath
  • system configuration directory
  • user configuration directory
  • current directory
  • JVM variables

Configuration files and variables are read in this order, last file found overwrite variables from previous file.

Classpath

This file contains default value and is found in cantharella WAR archive.

System configuration directory

  • Linux : /etc/cantharella.conf
  • Windows : C:\Windows\System32\cantharella.conf
  • Mac OS X : /etc/cantharella.conf

User configuration directory

  • Linux : ${user.home}/.config/cantharella.conf
  • Windows : ${user.home}\Application Data\cantharella.conf
  • Mac OS X : ${user.home}/Library/Application Support/cantharella.conf

Current directory

The directory used to launch application.

JVM variables

You can add parameter to JVM command line to set variable.

Example:

java -Ddb.user=$USER -Dmail.host=localhost ...

Adapt the variables

The default cantharella.conf file is listed below. You have to tune the variables available in order to adapt it to your need. To launch the application in your environment, the first need is to set db.url, db.user, db.password, mail.from and mail.host.

#
# DATABASE CONFIGURATION
#
db.url=jdbc:postgresql:cantharella
db.user=cantharella
db.password=cantharella
db.debug=false
db.hbm2ddl=validate

# Hibernate search lucene index location on filesystem.
hibernate.search.indexBase=/tmp/cantharella
# Hibernate search analyzer
hibernate.search.analyzer=org.apache.lucene.analysis.fr.FrenchAnalyzer

#
# SERVICE CONFIGURATION
#
mail.debug=false
[email protected]
mail.host=smtp

# default administration login/password
[email protected]
admin.password=password

# Document's allowed extensions
document.extension.allowed=jpeg,jpg,gif,png,xls,doc,pdf,cdx,mol

#
# WEB CONFIGURATION
#
app.debug=false
app.optimize=true
wicket.configuration=deployment
log4j.config=classpath:log4j_prod.xml

#document file max upload size (Mb)
document.maxUploadSize=1