QamoosTech
DevOps & CloudEnvironments and packagingBeginner

Environment Variable

Pronunciationen-VY-run-ment VAIR-ee-uh-bul

Definition

A setting stored outside the code, such as a database URL or an API key, so each environment can use different values.

Where you hear it

Deployment guides and .env files.

Examples

  • Put the API key in an environment variable, not in the code.
  • The app crashed because DATABASE_URL was not set.
  • Each server reads the database URL from an environment variable set on its own host.

Common mistake

Committing the .env file to Git. That leaks secrets to everyone who can see the repo.

Don't confuse with

Environment variables are often confused with configuration files, but environment variables are injected at runtime by the system, whereas configuration files are static files bundled with the application.

Say it at work

  • In a meeting or chatMake sure you update the environment variable for the new API endpoint before you restart the service.
  • In an email or ticketI have updated the deployment configuration to include the required environment variable for the staging server.