Skip to content

Environment or Database Configuration

The configuration settings for the applications are loaded from docker container by environment or from your database. If you have a configuration in you environment variables that one ALWAYS wins. The System checks the variable in the database und update them with the value from your System Env

The configurations can also change by using the configuration routes.

Auth

ConfigurationDescriptionDefault
AUTH_HANDLERHandler for managing User and Role Data. Possible Values: mongo or staticmongo
AUTH_APIKEYLENGTHLength of the generated API Key32
AUTH_SECRETPrivate Key for JWTsecret_key
AUTH_CACHE_DBShould the JWT cached to the DB to keep it after application restart.true
AUTH_EXPIRING_DURATIONLifetime of generated JWT6h
AUTH_BEAREREnable Bearer Header Token for secured routes.true
AUTH_BASICEnable HttpBasicAuth for secured routes.true
AUTH_TOKENEnable Api Key Token for secured routes.true

Server

ConfigurationDescriptionDefault
SERVER_INTERFACE0.0.0.0
SERVER_PORT8080

CORS

ConfigurationDescriptionDefault
CORS_HEADERS_ALLOWEDUsed as Access-Control-Allow-Origin["Authorization", "Content-Type", "X-Requested-With", "X-AUTH-APIKEY"]
CORS_HEADERS_EXPOSEDUsed as Access-Control-Expose-Headers["Content-Type", "x-pagination-rows-per-page", "x-pagination-current-page", "x-pagination-count-rows", "x-pagination-count-pages"]
CORS_ORIGINS_ALLOWEDAccess-Control-Expose-HeadersAccess-Control-Expose-Headers["http://localhost:8080"]

File

ConfigurationDescriptionDefault
FILE_HANDLERDefault only supported gridfs. Possible to extend with Plugin.gridfs
FILE_CACHE_AGEUsed at File Header cache-control with value max-age=7776000

Plugins

INFO

All plugins in Folder and Modules will be activated automatically. If your want to exclude one of this plugins use PLUGINS_IGNORED, for example if you don't want to expose Metrics you can add dev.mongocamp.server.route.MetricsRoutes$ to ignored plugins.

ConfigurationDescriptionDefault
PLUGINS_IGNOREDList of ignored Plugins.[]
PLUGINS_MODULESList of your used Plugins / Maven Dependencies.[]
PLUGINS_MAVEN_REPOSITORIESList of your special MVN Repository (maybe private).[]
PLUGINS_DIRECTORYDirectory where the app search the plugins./opt/mongocamp/plugins
PLUGINS_URLSUrls of JARs the Server should download before startup.[]

HttpClient

ConfigurationDescriptionDefault
HTTP_CLIENT_HEADERSAdditional headers for hosts saved in the Database as String containing a Json with Headers. Sample at{}

Docs

ConfigurationDescriptionDefault
DOCS_SWAGGERShould the SwaggerUI served by server.false
DOCS_OPENAPIShould the OpenApi Yaml served by server.true

Released under the Apache License 2.0.