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 8

$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 7

$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';

Deep Dive