Configuration

This page documents environment variables used by the Docker Compose setup (backend, frontend, MongoDB, Keycloak).

Backend

Variable Description Example

BACKEND_HOST

Backend host/interface to bind to (container/runtime dependent)

0.0.0.0

BACKEND_PORT

Backend internal port (inside container)

8082

Frontend

Variable Description Example

FRONTEND_PORT

Frontend internal port (inside container)

3000

FRONTEND_PORT_MAPPED

Frontend port exposed on the host

3000

VITE_API_BASE_URL

Base URL used by the frontend to call the backend API

http://localhost:8082

VITE_BASE_URL

Base URL where the frontend is hosted (optional; used for routing/links)

/

MongoDB (optional)

Set USE_MONGO to enable persistence of configuration/state.

Variable Description Example

USE_MONGO

Enable MongoDB integration (true/false)

true

MONGO_HOST

MongoDB host

mongo

MONGO_PORT

MongoDB port

27017

MONGO_INITDB_ROOT_USERNAME

MongoDB root username

root

MONGO_INITDB_ROOT_PASSWORD

MongoDB root password

rootpassword

MONGO_INITDB_DATABASE

Initial database name

aidapt_database

MONGO_CONFIGURATION_STORAGE_COLLECTION

Collection for configuration storage

configurations

MONGO_CONFIGURATION_STORAGE_DATABASE

Database used for configuration storage

aidapt_database

Keycloak (optional)

Enable authentication in the frontend with VITE_USE_KEYCLOAK=true.

Variable Description Example

VITE_USE_KEYCLOAK

Enable Keycloak integration in frontend (true/false)

false

VITE_KEYCLOAK_URL

Keycloak base URL

https://auth.yourdomain.com

VITE_KEYCLOAK_REALM

Realm name

your-realm

VITE_KEYCLOAK_CLIENT_ID

Frontend client id

your-client-id

VITE_KEYCLOAK_CLIENT_SECRET

Frontend client secret (if applicable)

*

KEYCLOAK_CLIENT_ID

Backend client id (for token verification / introspection if used)

your-backend-client-id

KEYCLOAK_CLIENT_SECRET

Backend client secret (if used)

*

Gurobi (optimization backend, optional)

These variables control the use of the Gurobi optimizer for optimization-based spatial bias mitigation methods.

Variable Description Example

USE_GRB_LIC

Enable explicit Gurobi license configuration (true/false). If false, the default Gurobi environment is used.

true

GRB_WLSACCESSID

Web License Service (WLS) Access ID. Only required when using a WLS license.

xxxxxxxxxxxxxxxx

GRB_WLSSECRET

Web License Service (WLS) Secret. Only required when using a WLS license.

xxxxxxxxxxxxxxxx

GRB_LICENSEID

Gurobi License ID (WLS). Only required when explicitly configuring a WLS license.

xxxxxxxx

GRB_FALLBACK_TO_DEFAULT

If true, fall back to the default Gurobi environment when explicit license configuration fails (e.g. expired license).

true

GRB_OUTPUT_FLAG

Control Gurobi logging (0 = silent, 1 = verbose). Recommended to keep 0 for API usage.

0

GRB_THREADS

Control the number of threads used by Gurobi.

1

Example .env

# Backend
BACKEND_HOST=0.0.0.0
BACKEND_PORT=8082

# Frontend
FRONTEND_PORT=3000
FRONTEND_PORT_MAPPED=3000
VITE_API_BASE_URL=http://localhost:8082
VITE_BASE_URL=/

# MongoDB
USE_MONGO=false

# Keycloak
VITE_USE_KEYCLOAK=false