Skip to main content

Environment Variables

Environment variables allow you to configure the MFE Orchestrator container according to your specific needs. These variables control various aspects of the application, from database connections to authentication providers and email services.

How to Configure

You can set environment variables in different ways depending on your deployment method:

  • Docker: Use the -e flag: docker run -e VARIABLE_NAME=value
  • Docker Compose: Add them to the environment section in your docker-compose.yml
  • Terraform: Configure them in your Terraform variables file
tip

For security-sensitive values like passwords and secrets, consider using Docker secrets or environment variable files (.env) that are not committed to version control.

Available Variables

General Configuration

VariableDefault ValueDescription
FRONTEND_URLhttp://localhost:3000URL of the frontend application.
REGISTRATION_ALLOWEDfalseIf true, allows new user registration.
ALLOW_EMBEDDED_LOGINtrueIf true, enables the login system within the application.
MICROFRONTEND_HOST_FOLDER/var/microfrontendsFolder containing the host microfrontends.
ALLOWED_ORIGINS(empty)List of allowed URLs for cross-origin requests comma separated.
LOG_LEVELinfo (debug/info/warn/error)Logging level.

Database Configuration

MongoDB

VariableDefault ValueDescription
NOSQL_DATABASE_URLmongodb://localhost:27017/microfrontend-orchestratorMongoDB database connection URL.
NOSQL_DATABASE_NAMEmicrofrontend-orchestratorMongoDB database name.
NOSQL_DATABASE_USERNAMErootMongoDB username.
NOSQL_DATABASE_PASSWORDexampleMongoDB password.

Redis

VariableDefault ValueDescription
REDIS_URLredis://localhost:6379Redis server connection URL.
REDIS_PASSWORD(empty)Password for Redis access (if set).

Email Configuration (SMTP)

VariableDefault ValueDescription
EMAIL_SMTP_HOSTsmtp.example.comSMTP server host for sending emails.
EMAIL_SMTP_PORT587SMTP server port (e.g., 587 for TLS).
EMAIL_SMTP_SECUREfalseIf true, uses secure connection (SSL/TLS).
EMAIL_SMTP_USER(empty)Username for SMTP authentication.
EMAIL_SMTP_PASSWORD(empty)Password for SMTP authentication.
EMAIL_SMTP_FROMno-reply@example.comSender email address.

Security & Authentication

JWT

VariableDefault ValueDescription
JWT_SECRETyour-secret-key-hereSecret key for JWT generation and validation.

Auth0

VariableDefault ValueDescription
AUTH0_DOMAIN(empty)Auth0 tenant domain.
AUTH0_CLIENT_ID(empty)Client ID of the Auth0 application.
AUTH0_AUDIENCE(empty)API Audience configured in Auth0.

Azure Entra ID

VariableDefault ValueDescription
AZURE_ENTRAID_TENANT_ID(empty)Azure Entra ID tenant ID.
AZURE_ENTRAID_CLIENT_ID(empty)Client ID of the registered Azure application.
AZURE_ENTRAID_REDIRECT_URI(empty)Redirect URI for Azure authentication.
AZURE_ENTRAID_AUTHORITYhttps://login.microsoftonline.comAuthentication authority URL.
AZURE_ENTRAID_SCOPESopenid profile emailRequired scopes during login.
AZURE_ENTRAID_API_AUDIENCE(empty)Protected API identifier in Azure.

Google OAuth

VariableDefault ValueDescription
GOOGLE_CLIENT_ID(empty)Client ID for Google OAuth authentication.
GOOGLE_REDIRECT_URI(empty)Redirect URI for Google OAuth.
GOOGLE_AUTH_SCOPEhttps://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profileRequired scopes to get Google email and profile.