[wp-trac] [WordPress Trac] #52668: Make it easier to override the built-in docker environment's config
WordPress Trac
noreply at wordpress.org
Fri Feb 26 18:28:07 UTC 2021
#52668: Make it easier to override the built-in docker environment's config
-------------------------------+-----------------------------
Reporter: TimothyBlynJacobs | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52668>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list