ddev icon indicating copy to clipboard operation
ddev copied to clipboard

Feature: `.ddev/.env.<anything>` or `.ddev/.env.global.<anything>`

Open rfay opened this issue 10 months ago • 2 comments

Feature Request

We might want to have a way to use a unique .ddev/.env.* file for particular applications.

This specifically relates to

  • #7233

They would like a Craft-specific .env that is not in the application space. It's a good idea and would improve all the CMSs that use .env, and we wouldn't be writing their file or really needing the #ddev-generated as much, although we can still request it.

Currently .ddev/.env works great for all containers, and .ddev/.env.* refers to a particular container name like .ddev/.env.solr

rfay avatar Apr 25 '25 17:04 rfay

Think about how we should gitignore these .env files in the .ddev/ directory.

stasadev avatar May 15 '25 19:05 stasadev

From Drupal Slack https://drupal.slack.com/archives/C5TQRQZRR/p1754664513749809

It's better not to deliver .ddev/.env.web in add-on, because other add-ons may deliver it as well. I think we should extend the support on .ddev/.env for .ddev/.env.<anything>.<service>

stasadev avatar Aug 08 '25 17:08 stasadev