blomstra / s3-assets
Relocate Flarum disks onto S3 or compatible bucket
Installs: 174
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 1
Open Issues: 0
Type:flarum-extension
Requires
- flarum/core: ^1.3.1
- league/flysystem-aws-s3-v3: *
- vlucas/phpdotenv: ^5.4
This package is auto-updated.
Last update: 2024-12-15 19:34:04 UTC
README
A Flarum extension. Relocate Flarum disks onto S3 or compatible bucket
Installation
Install with composer:
composer require blomstra/s3-assets:"*"
Updating
composer update blomstra/s3-assets php flarum cache:clear
Configuration
The S3 (or compatible) bucket can be configured either by environment variables or via the extension settings. If the environment variables are set, they will override the settings entered in the admin panel, if set.
Environment variables
AWS_ACCESS_KEY_ID
- your access key IDAWS_SECRET_ACCESS_KEY
- your secretAWS_DEFAULT_REGION
- the regionAWS_BUCKET
- the bucket nameAWS_URL
- the public facing base URL of the bucketAWS_ENDPOINT
- the ARNAWS_ACL
- The ACL, if any, that should be applied to the uploaded object (default: private). For possible values, see AWS DocsAWS_PATH_STYLE_ENDPOINT
- boolean value
If you plan to setup the S3 configuration using the environment variables, please ensure these are set before enabling the extension
Transferring assets from the existing filesystem to the S3 bucket
After your new bucket is configured, any exisiting files, will not exist there (ie uploaded avatars, profile covers, etc).
Use the provided command to start moving these files:
php flarum s3:move