Improve environment variable from file support
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 7.4k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
The environment variable from file support is currently very fragmented on the PHP side.
This is extremely fragile, as it is all or nothing with the _FILE environment variables - and to complicate things, one of them is non-_FILE. Note that some environment variables such as these must also be supported in the entrypoint script.
These should be refactored to use a common function f(string) -> string that returns the environment variable value given its name and an optional default (no matter whether it is from file or not). There is already a somewhat parallel idea implemented in the entrypoint script -
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read .config/autoconfig.php and .config/smtp.config.php alongside docker-entrypoint.sh, focusing on their existing environment-variable and _FILE handling. Trace which variables need support in both PHP configuration and the entrypoint. Done means the fragmented handling uses a common f(string) -> string function with optional defaults while preserving the required environment-variable behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, php, shell
- Domain
- devops
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100