Search code examples
ddev

How can I prevent DDEV from overrwriting .env vars or other settings?


Every time ddev starts up, it overwrites certain .env files in my Laravel project, like DB_CONNECTION. Some dev's in the team don't use the mysql docker server that ddev providers, but have one installed on their local machine for performance considerations. They need different .env vars than ddev thinks.

Can we prevent ddev from modding the .env file? I believe it's only been the case for more recent versions of ddev, and wasn't there before.

Startup and leave the environment variables as if (perhaps via a flag in config.yaml)


Solution

  • DDEV provides lots of features for settings management, see docs. You probably want to disable settings management:

    disable_settings_management: true