Skip to content

feat(php): configure Redis session handling via environment variables#2550

Draft
joshtrichards wants to merge 4 commits intomasterfrom
jtr/feat-redis-session-env-pure
Draft

feat(php): configure Redis session handling via environment variables#2550
joshtrichards wants to merge 4 commits intomasterfrom
jtr/feat-redis-session-env-pure

Conversation

@joshtrichards
Copy link
Member

Fixes #763

Configure existing REDIS_* image configuration variables as they exist today (no changes).

For standard environments (i.e. those that already work today with the existing implementation), the result should be:

  • No change

For environments running containers w/o root:

  • They should start working (i.e. using the specified REDIS_HOST as the PHP session handler... instead of generating an error about being unable to write to the ini file and falling back on file-based session storage)

This is a prototype in its current state.

Key things to confirm:

  • What happens when the env vars are unset?

P.S. If the empty values being always passed through is problematic.... This tests the full “drop redis-session.ini entirely” idea. If this runs into challenges, we could generate a separate ini file (only when Redis is configured) in the entrypoint, but still source values from env. That would test the env-based composition separately from the fallback problem.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Fixes #763 

Implements part I of #763 (comment)

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing enhancement feature: auto config (environment variables) Auto configuring via environment variables rootless Running in Docker w/o root

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduced redis session handler does not work with non-root images

1 participant