Add local.settings.php to every instance

This commit adds a new file 'local.settings.php' to each distillery
instance. This file can be used to automatically edit global distillery
settings.
This commit is contained in:
Tom Wiesing 2024-04-01 16:41:11 +02:00
parent 6eab3ac311
commit 24ff81f7cd
No known key found for this signature in database
13 changed files with 98 additions and 42 deletions

View file

@ -7,8 +7,9 @@ import (
"github.com/FAU-CDI/wisski-distillery/pkg/logging"
)
// RebuildSettings (re-)configures settings.php for the provided running instance
func (smanager *SystemManager) RebuildSettings(ctx context.Context, progress io.Writer) (err error) {
// BuildSettings sets up global settings.php configuration settings.php for the provided running instance
// This doesn't need to be called manually.
func (smanager *SystemManager) BuildSettings(ctx context.Context, progress io.Writer) (err error) {
logging.LogMessage(progress, "Updating TRUSTED_HOST_PATTERNS in settings.php")
{
if err := smanager.dependencies.Settings.SetTrustedDomain(ctx, nil, smanager.Domain()); err != nil {