Skip to main content

Environment Variable

developer

Environment variables hold configuration — database credentials, API keys, app mode — outside the codebase. Secrets never belong in Git; they belong in the environment the application reads at runtime.

Keep .env out of version control and set per-environment values in the hosting panel.

The same Docker image runs in staging and production with different APP_URL variables.

Related topics

Frequently asked question

What is Environment Variable?

Environment variables hold configuration — database credentials, API keys, app mode — outside the codebase. Secrets never belong in Git; they belong in the environment the application reads at runtime. Keep .env out of version control and set per-environment values in the hosting panel.

Read the full answer