In most symfony projects, there is a .env in the project root with default variables, f.ex.:
REDIS_DSN=redis://redis
If we run a docker-container with the env variable APP_ENV=prod, none of the default variables will be loaded because there is a check in the Symfony bridge, that the .env is only loaded if APP_ENV does not exist.
In our understanding, this should be removed and the default variables should always be loaded.
In most symfony projects, there is a
.env
in the project root with default variables, f.ex.:If we run a docker-container with the env variable
APP_ENV=prod
, none of the default variables will be loaded because there is a check in the Symfony bridge, that the.env
is only loaded ifAPP_ENV
does not exist.In our understanding, this should be removed and the default variables should always be loaded.