Kloudlite provides two ways to manage configuration and sensitive data for your services: Environment Variables for key-value configuration and Config Files for complex configuration files. Secrets are stored securely and encrypted at rest.
Key-value pairs for simple configuration (API keys, database URLs, feature flags)
Full configuration files that services can mount and use (JSON, YAML, etc.)
Environment variables are key-value pairs that are injected into your services at runtime. They're perfect for configuration that changes between environments.
DATABASE_URL=postgres://user:pass@postgres:5432/myappSTRIPE_API_KEY=sk_test_...ENABLE_BETA_FEATURES=trueNODE_ENV=developmentConfig files allow you to upload complete configuration files that can be mounted into your services. This is useful for complex configurations that don't fit well as environment variables.
Secrets are sensitive data like passwords, API keys, and tokens. They are stored encrypted at rest and only decrypted when injected into services.
Security Best Practices
Reference configs and secrets in your Docker Compose service definitions using environment variable substitution.
Example: Using Environment Variables in Services
services:
api:
image: myapp/api:latest
environment:
# Reference environment-level variables
DATABASE_URL: ${DATABASE_URL}
REDIS_URL: ${REDIS_URL}
API_SECRET: ${API_SECRET}
NODE_ENV: production
ports:
- "3000:3000"Environment-Level Configuration
All configs and secrets are defined at the environment level in the Environment Settings. They are then available to all services in that environment via variable substitution.