0.0.3 • Published 3 years ago

@zaxbux/ghost-storage-b2 v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Backblaze B2 Storage Adapter for Ghost

A Backblaze B2 storage adapter for Ghost version 4 (also compatiable with version 3.x).

Installation

git clone https://github.com/zaxbux/ghost-storage-b2.git
cd ghost-storage-b2; npm i
cd ..
cp -r ghost-storage-b2 ./content/adapters/storage/b2

Configuration

You will need to obtain or create app keys and create a bucket in your B2 Cloud Storage Account.

If your Ghost configuration file, add the B2 configuration options:

{
  // ...

  "storage": {
    "active": "b2",
    "b2": {
      "applicationKeyId": "",
      // See table below for all config values
    }
  }

  // ...
}

Alternatively, the B2 storage adapter can be configured with environment variables:

JSON File OptionEnvironment VariableValue
applicationKeyIdB2_APPLICATION_KEY_IDYour B2 application key ID.
applicationKeyB2_APPLICATION_KEYYour B2 application key.
bucketIdB2_BUCKET_IDYour B2 bucket's ID.
bucketNameB2_BUCKET_NAME(optional) Your bucket's name.
pathPrefixB2_PATH_PREFIX(optional) The prefix to add to uploads.
downloadUrlB2_DOWNLOAD_URL(optional) Use a custom URL for downloading. (CDN, etc.)

Custom Domain

If you're using a custom domain instead of the default backblaze domain, e.g. with a CNAME pointing cdn.example.com to f001.backblazeb2.com, and your bucket name is my_bucket:

  • Set downloadUrl to https://cdn.example.com/file/my_bucket

Debugging

To debug the storage adapter, set the DEBUG environment variable to ghost-storage-b2.

Licence

MIT