Skip to main content

Environment Variables

TUMApply manages all environment variables and secrets for testserver and production via GitHub Repository Settings.


Where Are They Defined?

In GitHub Repository SettingsEnvironmentsTest-server / Production.

There are two types:

TypePurpose
Environment VariablesNon-sensitive configuration values
Environment SecretsSensitive values: client secrets, API keys, database passwords

How Are They Used?

During GitHub Actions workflow runs, all environment variables and secrets are injected dynamically into the deployment process. They override any default values from the Docker .env files (docker/mysql.env, docker/tumapply.env).

Security

Production and test secrets must only live in GitHub Secrets — never commit secrets to the repository.


Examples

Here are some common variables and secrets to give an idea of what is configured:

Environment Variables (non-sensitive):

VariableExample ValuePurpose
SPRING_PROFILES_ACTIVEprodActive Spring profile
SPRING_DATASOURCE_URLjdbc:mysql://mysql:3306/tumapplyDatabase connection URL
USER_RETENTION_ENABLEDtrueEnable/disable automatic user data retention

Environment Secrets (sensitive):

SecretPurpose
SPRING_DATASOURCE_PASSWORDDatabase password
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRETKeycloak client secret

Adding a New Variable

  1. Contact a repository admin to add the variable or secret in GitHub Repository SettingsEnvironments for the relevant environment(s)
  2. Ensure the variable is referenced in the deploy/build workflow if needed