Skip to content

simplerisk: set USE_DATABASE_FOR_SESSIONS to true in config.php#139

Merged
jsokol merged 2 commits into
masterfrom
fix-use-database-for-sessions
May 22, 2026
Merged

simplerisk: set USE_DATABASE_FOR_SESSIONS to true in config.php#139
jsokol merged 2 commits into
masterfrom
fix-use-database-for-sessions

Conversation

@jsokol
Copy link
Copy Markdown
Member

@jsokol jsokol commented May 22, 2026

Summary

  • The full-stack simplerisk/common/entrypoint.sh was not substituting the __USE_DATABASE_FOR_SESSIONS__ placeholder shipped in config.sample.php, so the generated config.php contained define('USE_DATABASE_FOR_SESSIONS', '__USE_DATABASE_FOR_SESSIONS__'); — an invalid value.
  • Adds a sed substitution alongside the other DB substitutions in set_config that hardcodes the value to true.
  • The simplerisk-minimal image already handles this (via the SIMPLERISK_DB_FOR_SESSIONS env var, defaulting to true). The full-stack image bundles MySQL and hardcodes all other DB-related values, so keeping this hardcoded matches that pattern — no new env var introduced.

Test plan

  • Build the full-stack image locally (docker build -t simplerisk/simplerisk:test-uds simplerisk/)
  • Run a container and confirm /var/www/simplerisk/includes/config.php contains define('USE_DATABASE_FOR_SESSIONS', 'true'); — no placeholder remaining
  • CI: container-validation workflow (Dockle + Grype) passes on PR

🤖 Generated with Claude Code

jsokol and others added 2 commits May 22, 2026 09:42
The full-stack entrypoint was not substituting the
__USE_DATABASE_FOR_SESSIONS__ placeholder shipped in config.sample.php,
leaving an invalid value in config.php. Hardcode it to 'true' alongside
the other DB substitutions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jsokol jsokol merged commit 85bef94 into master May 22, 2026
5 checks passed
@jsokol jsokol deleted the fix-use-database-for-sessions branch May 22, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant