dorsetdigital

FWIW, I tend to use a Cloudfront distribution in front of the S3 bucket as well if it's for something which needs to be fully distributed

dorsetdigital

The production server has it set, so the S3 system kicks in

dorsetdigital

My local dev copy just uses the local file system, as I don't have the bucket name set in the .env file

dorsetdigital

That's the YML I use... and that picks up from the env vars

taoceanz

Readme says full details on env vars can be seen in SilverStripeS3AdapterTrait though that doesn't appear to exist

dorsetdigital
  1. ---
  2. Only:
  3. envvarset: AWS_BUCKET_NAME
  4. After:
  5. - '#assetsflysystem'
  6. ---
  7. SilverStripe\Core\Injector\Injector:
  8. Aws\S3\S3Client:
  9. constructor:
  10. configuration:
  11. region: '`AWS_REGION`'
  12. version: latest
  13. credentials:
  14. key: '`AWS_ACCESS_KEY_ID`'
  15. secret: '`AWS_SECRET_ACCESS_KEY`'
thats4shaw

Server environment vars are probably more desirable.

thats4shaw

Yep, environment vars. Well last time I played with it.