Config sample migration and updating PHP versions to 8.4 and 8.5#135
Merged
Conversation
Copy config.sample.php into config.php before the existing sed substitutions, and gate config writing + DB setup + mail settings behind an opt-in trigger (any SIMPLERISK_DB_* env var or DB_SETUP). When the operator provides no DB env vars, config.php is left absent so the SimpleRisk web installer takes over. Also remove the SIMPLERISK_INSTALLED toggle (define no longer exists upstream) and the version=testing URL-uncomment block (its target defines are gone from the new template).
Handle the upgrade-on-persisted-volume case where config.sample.php
is absent (only config.php from the old image exists) by reusing the
existing file. The subsequent sed substitutions still apply env-var
values via the generic ('FOO', '...') regex. Fall back to fatal_error
if neither file is present.
Also scope CONFIG_PATH and CONFIG_SAMPLE_PATH to set_config() with
the local keyword.
Copy config.sample.php into config.php before the existing sed substitutions run, with a defensive fallback for upgrade users whose persisted /var/www/simplerisk volume has an old config.php but no config.sample.php. The bundled-MySQL provisioning flow is otherwise unchanged; the SimpleRisk installer's admin-detection handles the no-admin case on first browser hit. Also remove the SIMPLERISK_INSTALLED toggle (define is gone upstream) and the version=testing URL-uncomment line (its target defines no longer exist in the template).
cd9e3f6 to
96d0ea4
Compare
jsokol
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.