Environment Variables
Environment variables allow you to configure your application without changing code. Blossom provides two types of environment variables:
Runtime vs Build Environment Variables
- Runtime Variables: Available to your application during execution
- Build Variables: Available during both build and runtime phases
Managing Environment Variables
- Navigate to your app’s Environment Variables page
- Add new variables using the “Add New Environment Variable” button
- Check the “Build” checkbox if the variable should be available during build
- Click “Save Changes” to apply
Build Environment Variables
Build variables are passed to your build process based on your build type:
- Buildpack: Uses
--env KEY=VALUE
- Dockerfile: Uses
--build-arg KEY=VALUE
- Nixpacks: Uses
--env KEY=VALUE
Linked Variables
Environment variables can also be automatically linked from services like databases. These are read-only and will be overridden by manually set environment variables with the same name.
Security
- Environment variable values are encrypted at rest
- Values are hidden by default but can be revealed temporarily
- Only users with app access can view or modify variables