Skip to content

Instantly share code, notes, and snippets.

@stevewithington
Last active May 8, 2018 23:25
Show Gist options
  • Save stevewithington/49075a04b1220b54805365d51af929e9 to your computer and use it in GitHub Desktop.
Save stevewithington/49075a04b1220b54805365d51af929e9 to your computer and use it in GitHub Desktop.
Mura: How to Configure Mura CMS to Use Amazon S3 for File Storage

How to Configure Mura CMS to Use Amazon S3 for File Storage

custom mapping in the config/cfapplication.cfm file

this.mappings["/s3assets"] = "s3://{access_key}:{secret_key}@/{your_bucket}/";

IF using Docker, example settings for a docker-compose.yml file with Mura

MURA_ASSETPATH: "https://{your_bucket}.s3.amazonaws.com/"
MURA_ASSETDIR: "/s3assets"
MURA_FILEDIR: "/s3assets"

OR in a non-Docker environment, in the config/settings.ini.cfm file

assetpath=https://{your_bucket}.s3.amazonaws.com/
assetdir=/s3assets
filedir=/s3assets

Tested and verified works with Mura 7.0+ on Lucee 5

@danlance
Copy link

danlance commented May 8, 2018

With Mura 7.1 using Docker, rather than setting up the custom mapping within config/cfapplication.cfm (which didn't seem to work though could be user error), setting the MURA_S3ASSETS environment variable within docker-compose.yml appears to work, and would seem a much more Docker friendly approach:

MURA_S3ASSETS: "s3://{access_key}:{secret_key}@s3.amazonaws.com/{your_bucket}/"

Would this now be the preferred approach with 7.1 on docker?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment