Overview
Environment variables in Ondateta are divided into three categories based on their usage:- Debug: Variables used during development
- Production: Variables used in production
- All: Variables used in both development and production
Debug Variables
Debug variables are injected into your project during development:Generic Projects
For standard projects, variables are injected into a.env file in the base path chosen for the project.
Flutter Projects
For Flutter projects, variables are also injected via--dart-define directly into the application during compilation.
Debug Variables Security
Debug variables are available only inside the disposable virtual machines used for development. These VMs are created and destroyed for each development session, ensuring the isolation of your credentials.
Production Variables
Production variables are keys that are used exclusively when publishing the app or website online. These variables are injected in the same way as described above, but only during the production deployment process.All Variables
All variables are used both during development and in production, providing a consistent configuration across both environments.Best Practices
Usage Example
.env.example File
Accessing Variables
Frequently Asked Questions
What happens if I manually modify the local .env file?
What happens if I manually modify the local .env file?
Manual changes to the local
.env file will be preserved. Ondateta does not overwrite existing .env files.How does injection work for Flutter projects?
How does injection work for Flutter projects?
For Flutter, variables are passed also via
--dart-define during build, allowing you to access them through String.fromEnvironment().Are debug variables secure?
Are debug variables secure?
Yes, debug variables are only available in the disposable VMs used for development and are destroyed at the end of the session.