Opened 2 years ago
Last modified 2 years ago
#52668 new enhancement
Make it easier to override the built-in docker environment's config
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | needs-patch |
Focuses: | Cc: |
Description
Core currently ships with a .env
file to provide a default configuration to the built-in Docker environment. If you want to override some of these variables you can setup values as environment variables before invoking the npm run env:*
commands.
It can be a somewhat frustrating DUX if you need to consistently override these values, and not just once for testing some specific configuration. For instance if you need to use mariadb for ARM support, or making sure the correct port is used.
One possibility to make this more permanent is to modify the .env
file itself, but then you need to remember to exclude changes to that file when committing which is a bit annoying.
There is the ability to create a docker-compose override file. But IMO that is a bit of overkill if just using the existing environment variable configuration would be sufficient.
One way I think we could solve this would be to change the .env
file to .env.example
and then in a post install
routine copy the file from .env.example
to .env
if a .env
file does not already exist. That way, if a user wants to they can customize that .env
file without any fear that a future pull will overwrite their changes or that their changes would be accidentally included in a commit.
dotenv recommends against committing the `.env` file for this reason.