studoverse/campus-qr

Do not hardcode server config

Opened this issue · 2 comments

in src/serverMain/kotlin/com/studo/campusqr/database/InitialSetup.kt are many settings for the server hardcoded.

These settings do not care about environment vars (HOST, PORT).

Please change to reading server configuration from a file (e.g. yaml)

Hi, the values in InitialSetup.kt are only the default values. All values can be changed in MongoDB, as described in the "App Configuration" tab when logged into the moderation-frontend as administrator:

All configuration flags that are in the MongoDB database listed in collection "configuration" can be changed by the administrator. Those flags are persisted in the database even across application restarts and updates of this application. Examples for configuration flags are the imprint URL, the base URL for scanning the QR codes or the number of days after the check-in data is automatically deleted. Please contact the Studo team for further assistance or if you need more configuration parameters.

Server configs for development, testing, demo and production should be

  • easy to set
  • easy to reproduce
  • easy to compare with each other

A test editor should be sufficient.

CI and CD must not require manual intervention by an administrator.