Skip to content

Configuration Core

Urs Joss edited this page Dec 9, 2017 · 27 revisions

Configuration of SciPaMaTo-Core

You can provide a configuration file application.properties and put it in the same directory where your scipamato-core-web.jar resides.

The properties are of the following form:

specific.property.name=value

Any line starting with the hash (#) is considered a comment. You can find a full sample application.properties at the end of the page.

1. Application specific settings

scipamato.brand

The brand name of the application. (default: SciPaMaTo)

scipamato.localization.default

The default localization for the user interface (default: de (German), currently also supported en (English))

scipamato.paper.number.minimum-to-be-recycled

The lowest number SciPaMaTo will consider for new papers (in case of gaps). I.e. any number below the defined value would not be recycled in case of gaps. Set this in order to either create a gap by using a higher number than the currently highest assigned number. Or to prevent SciPaMaTo from filling gaps in a lower range and only recycle free numbers in the high ranges.

wicket.external.agilcoders.bootstrap.theme

The look and feel of the application. SciPaMaTo can use the themes provided by Bootswatch, the default theme is cerulean. Other options, e.g. cosmo, cyborg, darkly, flatly, journal, lumen, paper, readable, sandstone, simplex, slate, solar, spacelab, superhero, united, yeti.

2. Web Server Settings

server.port

defines the port the application server listens on (default: 8080)

spring.http.multipart.max-file-size

The maximum file size for a single attachment (default: 10MB)

spring.http.multipart.max-request-size

Max request size (for all files combined) (default: 10MB)

3. Logging

logging.file

location of your log file (default: log/scipamato.log)

logging.level.root

root log level, e.g. DEBUG, INFO, WARN (default: INFO)

logging.level.ch.difty

log level for specific package (here e.g. ch.difty.*)

4. Database

The core application needs both the connection information for the core database and the public database. The latter is required for pushing data from the core to the public database (synchronization).

The application uses user/password and jdbc connection string starting with sync.source both for working purely within SciPaMaTo-Core, but also for reading core data during the synchronization.

Spring-batch uses user/password and jdbc connection string starting with sync.target for writing into the public application (the user needs permissions select, insert, update and delete in the respective public tables).

Spring-batch further uses user/password and jdbc connection string starting with sync.batch to store the meta information about the synchronization steps and jobs in the SciPaMaTo-Core table.

db.schema

the database schema (default: public)

sync.source.datasource.jdbc-url

the jdbc connection string for the core database (default: jdbc:postgresql://localhost:5432/scipamato)

sync.source.datasource.username

the user name for the application to connect to the core database (default: scipamato)

sync.source.datasource.password

the password for the application to connect to the core database (default: scipamato)

sync.target.datasource.jdbc-url

the jdbc connection string for the pulibc database (default: jdbc:postgresql://localhost:5432/scipamato_public)

sync.target.datasource.username

the username for the core application for pushing the data into the public database (default: scipamadminpub)

sync.target.datasource.password

the password for the core application for pushing the data into the public database (default: scipamadminpub)

sync.batch.datasource.jdbc-url

the jdbc connection string for the application for the administration of the data synchronization process from core to public (spring-batch meta-tables) (default: inherits the setting from sync.source.datasource.jdbc-url)

sync.batch.datasource.username

user to maintain the spring batch meta tables (default: scipamadmin)

sync.batch.datasource.password

password for above user (default: scipamadmin)

5. Database Migration

flyway.user

The user name used by Flyway to perform the migrations. Must have the permissions to create, modify, update, drop tables, sequences and alter the data. (default 'scipamadmin').

flyway.password

Password for above user (default: 'scipamadmin')

flyway.cleanDisabled

If this setting is set to true, Flyway refuses to clear the database, even if called to do so. Definitely should be set to true in production environments.

6. Example application properties

The following example provides the default values (except the database profile!). There’s no need to use this specific version. But you can use it as a template to change specific values to configure your preferred choices.

#
# Application specific settings
#
##################################

# Brand name of  the application
scipamato.brand=SciPaMaTo
# Default Localization [en, de]
scipamato.localization.default=de
# Lowest paper number that can be recycled in case of gaps
scipamato.paper.number.minimum-to-be-recycled=30

# Look and Feel: Bootstrap Theme - see http://bootswatch.com/
wicket.external.agilcoders.bootstrap.theme=cerulean


#
# Web Server Settings
#
########################

# Port exposing the application, i.e. 8080 -> http://localhost:8080/
server.port=8080

# Maximum file upload size
spring.http.multipart.max-file-size=10MB
spring.http.multipart.max-request-size=10MB


#
# Logging specification
#
###########################

logging.file=log/scipamato.log
logging.level.root=INFO


#
# Database Configuration
#
#############################

sync.source.datasource.jdbc-url=jdbc:postgresql://localhost:5432/scipamato
sync.source.datasource.username=scipamato
sync.source.datasource.password=scipamato

sync.target.datasource.jdbc-url=jdbc:postgresql://localhost:5432/scipamato_public
sync.target.datasource.username=scipamadminpub
sync.target.datasource.password=scipamadminpub

sync.batch.datasource.jdbc-url=${sync.source.datasource.jdbc-url}
sync.batch.datasource.username=scipamadmin
sync.batch.datasource.password=scipamadmin


#
# Database Migration settings (FlyWay)
#

flyway.url=${sync.batch.datasource.jdbc-url}
flyway.user=${sync.batch.datasource.username}
flyway.password=${sync.batch.datasource.password}

If the property file contains passwords, it makes sense to protecte the file from reading for unauthorized users.

Clone this wiki locally