Storage
The following filesystems are provisioned per environment:
- Public = Files which can be accessed by anonymous users. (Nginx / PHP)
- Private = Files which have to be accessed with authentication. (PHP)
- Temporary = Used when performing operations on files. (PHP)
The mount paths are passed to the application as config.
skpr config list dev | grep mount
mount.public /data/app/sites/default/files
mount.temporary /mnt/temporary
mount.private /mnt/private
Drupal 10 and 11
$settings['file_public_path'] = 'sites/default/files';
$config['system.file']['path']['temporary'] = $skpr_config->get('mount.temporary') ?: '/tmp';
$settings['file_private_path'] = $skpr_config->get('mount.private') ?: '/private';
note
Drupal requires $settings['file_public_path'] to be a relative path.
Drupal 8 and 9 (Legacy)
The configuration is identical to Drupal 10+:
$settings['file_public_path'] = 'sites/default/files';
$config['system.file']['path']['temporary'] = $skpr_config->get('mount.temporary') ?: '/tmp';
$settings['file_private_path'] = $skpr_config->get('mount.private') ?: '/private';
Drupal 7 (End of Life)
warning
Drupal 7 reached end of life in January 2025. These instructions are provided for reference only.
$conf['file_public_path'] = 'sites/default/files';
$conf['file_temporary_path'] = $skpr_config->get('mount.temporary') ?: '/tmp';
$conf['file_private_path'] = $skpr_config->get('mount.private') ?: '/private';