-
Notifications
You must be signed in to change notification settings - Fork 3
Configuration variables MathShareBackend
The MathShare project contains a server side of the application. There is a possibility to set the configuration variables used in the backend application in order to adjust them to a software environment. This page presents the capabilities of MathShareBackend configuration
MathShareBacked application is planned to work in the following enviroments:
- local - for development purposes
- test - for testing purposes
- dockerized - for production purposes
The local environment allows to conveniently develop the application. In this situation the parameters will be used from application.yml file from the classpath:
src/main/resources/application.yml
A variable should follow the pattern:
variableName: ${ENV_NAME:value}
The test environment allows to test the project functionalities using the separate parameters. In this situation the parameters will be used from application.yml file from the test directory path:
src/test/resources/application.yml
A variable should follow the pattern:
variableName: value
The dockerized environment allows to use the application basing on Docker containers. In this situation the parameters will be used from global environments defined in docker-compose.yml file. To get a Docker parameter name (Environmental name) and it's default value (Default value) see the table below.
The table describes the possible parameters. The parameter names are used in application.yml files and the related environmental names are used in a dockerized environment - docker-compose.yml.
Logging level - The possible values: ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN. You can also specify a class name with package (logging.level.PACKAGE.CLASS) which the logs would concern.
Variable name | Environmental name | Default value | Description |
---|---|---|---|
spring.datasource.url | SPRING_DATASOURCE_URL | jdbc:postgresql://localhost:5432/mathshare | Database data source url |
spring.datasource.username | SPRING_DATASOURCE_USERNAME | postgres | Database username |
spring.datasource.password | SPRING_DATASOURCE_PASSWORD | mysecretpassword | Database user password |
spring.datasource.driverClassName | SPRING_DATASOURCE_DRIVERCLASSNAME | org.postgresql.Driver | Database driver class name |
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation | JPA_PROPERTIES_HIBERNATE_JDBC_LOB_NON_CONTEXTUAL_CREATION | true | Enabling/disabling non contextual creation for Hibernate |
logging.level.org.hibernate | LOGGING_LEVEL_ORG_HIBERNATE | ERROR | Hibernate logging level |
logging.path | LOGGING_PATH | logs | Logging path (directory) |
server.port | SERVER_PORT | 8080 | Running server port |