Public Repository

Last pushed: 6 months ago
Short Description
A mod of the official ghost repository that adds the functionality of ghost-s3-storage-adapter.
Full Description

Ghost by default does all of its image hosting locally so anyone wanting to use one of the plethora of NPM packages available to add images uploaded to ghost to an Amazon S3 bucket would have to then dockerize that modified container.

That may not be as easy as one would anticipate, therefore after finishing the process myself I chose to upload my take on the process to docker hub.

This image expects you to map your config.js file into the proper location via volume, where that config.js file contains a storage block that looks like this (a good place to add it is just after the "paths" in your dev / production configuration):

paths: {
  contentPath: path.join(process.env.GHOST_CONTENT, '/')
},
storage: {
    active: 'ghost-s3',
    'ghost-s3': {
      accessKeyId: 'AKIAXXXXXXXXXXXX',
      assetHost: 'http://someurlat.cloudfront.net/',
      bucket: 'amazonS3bucket',
      region: 'us-east-1',
      secretAccessKey: 'PEFXXXXXXXXXXXX'
    }
  }

Some stuff to note, you need to have the "http" added to the front of the asset host and also the trailing "/". For Amazon S3 buckets in Region "US Standard" you need to instead write "us-east-1" (as I did above) since this is actually the name amazon goes by for their API's

Amazon IAM configuration is sort of a pain and I am hoping to add that to the docs eventually. It should be noted that right now the actual dependencies required are ADDed to the image as opposed to running NPM install from inside since this is drastically smaller overall.

The main problem I ran into building this was actually related to chown'ing the packages once installed. If you are thinking of building something similar, take notice of the last lines in my Dockerfile!

Docker Pull Command
Owner
ncevl