.env.dist.local
: Acting as a "distribution" template, it defines the structure of required variables without providing sensitive values.
Ensure .env.local and .env (if used for secrets) are ignored. cp .env.dist.local .env.local .env.dist.local
💡 : Use this file to define variables like LOCAL_DOCKER_PORT or XDEBUG_CONFIG that vary between Mac, Windows, and Linux dev environments. : Acting as a "distribution" template, it defines
| File | Version Control | Purpose | Typical content | |------|----------------|---------|----------------| | .env.dist.local | ✅ Committed | Blueprint for local dev env vars | DATABASE_URL=mysql://root@127.0.0.1:3306/app | | .env.local | ❌ Gitignored | Actual local overrides (user-specific) | DATABASE_URL=mysql://user:pass@127.0.0.1:3306/app | | .env.testing | ✅ Committed (or sample) | Test suite config | DATABASE_URL=sqlite:///:memory: | | File | Version Control | Purpose |
Have you used .env.dist.local in production? Share your experience — or horror stories of .env disasters — in the comments below.