https://github.com/city-of-helsinki/drupal-module-helfi-azure-fs
Drupal module for Azure specific file system fixes
https://github.com/city-of-helsinki/drupal-module-helfi-azure-fs
Last synced: 26 days ago
JSON representation
Drupal module for Azure specific file system fixes
- Host: GitHub
- URL: https://github.com/city-of-helsinki/drupal-module-helfi-azure-fs
- Owner: City-of-Helsinki
- License: mit
- Created: 2021-05-07T08:58:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-12T12:51:53.000Z (about 1 month ago)
- Last Synced: 2025-06-12T13:51:11.940Z (about 1 month ago)
- Language: PHP
- Size: 194 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Drupal Azure FS
 [](https://sonarcloud.io/summary/new_code?id=City-of-Helsinki_drupal-module-helfi-azure-fs)
Provides various fixes to deal with Azure's NFS mount and an integration to Azure's Blob storage service using [flysystem](https://www.drupal.org/project/flysystem).
Azure's NFS file mount does not support certain file operations (such as chmod), causing any request that performs them to give a 5xx error, like when trying to generate an image style.
This module decorates core's `file_system` service to skip unsupported file operations when the site is operating on Azure environment.
## Requirements
- PHP 8.1 or higher
## Usage
Enable the module.
### Using Azure Blob storage to host all files (optional)
- Populate required environment variables:
```
AZURE_BLOB_STORAGE_CONTAINER: The container name
AZURE_BLOB_STORAGE_NAME: The blob storage name
BLOBSTORAGE_ACCOUNT_KEY: The blob storage secret
```or if you're using SAS token authentication:
```
BLOBSTORAGE_SAS_TOKEN: The SAS token
AZURE_BLOB_STORAGE_NAME: The blob storage name
```### Testing on local
Add something like this to your `local.settings.php` file:
```php
$schemes = [
'azure' => [
'driver' => 'helfi_azure',
'config' => [
'name' => '[ insert account name here ]',
'token' => '[ insert sas token here ]',
'container' => '[ insert container name here ]',
'endpointSuffix' => 'core.windows.net',
'protocol' => 'https',
],
'cache' => TRUE,
],
];
$config['helfi_azure_fs.settings']['use_blob_storage'] = TRUE;
$settings['flysystem'] = $schemes;
$settings['is_azure'] = TRUE;
```The correct values can be found by running `printenv | grep BLOB` inside a OpenShift Drupal pod.
## Contact
Slack: #helfi-drupal (http://helsinkicity.slack.com/)