SMLL Docs

Environment Variables

Configure environment variables and link secrets to your services.

Environment variables let you pass configuration to your services without baking values into your Docker image.

Setting environment variables

  1. Go to your service's Environment Variables tab
  2. Click Add Variable
  3. Enter a key and value
  4. Save and redeploy

Changes to environment variables require a redeployment to take effect.

Linking secrets

Instead of entering a plain text value, you can reference a key from a secret:

  1. Add a new environment variable
  2. Choose Link from secret
  3. Select the secret and the specific key
  4. Save and redeploy

This is especially useful for database credentials. When you create a database, SMLL auto-generates a secret with connection details. You can link DATABASE_URL from that secret directly into your service.

Example

Env varSourceSecret key
DATABASE_URLmy-db credentialsDATABASE_URL
API_KEYmy-api-secretAPI_KEY
PORTPlain value

How it works

  • Plain values are stored as a Kubernetes ConfigMap
  • Secret references are mounted from Kubernetes Secrets using secretKeyRef

Both are injected into your container at startup. Your application reads them like any other environment variable.

Best practices

  • Use secrets for sensitive values (API keys, passwords, tokens)
  • Use plain environment variables for non-sensitive configuration (ports, feature flags, log levels)
  • Reference the auto-generated database secret instead of copying credentials manually

On this page