Skip to content

Commit

Permalink
[DDS-1324] Added configuration for temporary files on mounted volume (#…
Browse files Browse the repository at this point in the history
…136)

* Added configuration for temporary files on mounted volume

* Fixed private files prefix
  • Loading branch information
nicksantamaria authored Nov 10, 2022
1 parent d7f10bb commit 5ba8c2b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions images/bay-php/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,16 @@
fast404_preboot($settings);
}

// Temp directory.
if (getenv('TMP')) {
$config['system.file']['path']['temporary'] = getenv('TMP');
if (empty($settings['file_private_path'])) {
$settings['file_private_path'] = 'sites/default/files/private';
}

// Use mounted fileshare for temp directory unless explicity disabled with
// BAY_SHARED_TEMP_FILES=false
if (getenv("BAY_SHARED_TEMP_FILES") !== "false") {
$config['system.file']['path']['temporary'] = sprintf("%s/tmp", $settings['file_private_path']);
} else {
$config['system.file']['path']['temporary'] = getenv("TMPDIR") ?: "/tmp";
}

// Hash Salt.
Expand Down

0 comments on commit 5ba8c2b

Please sign in to comment.