Code Monkey home page Code Monkey logo

ghost-storage-google-cloud's Introduction

Ghost Storage Plugin for Google Cloud Storage

Adds support for Google Cloud Storage. Designed for use within App Engine with zero configuration.

Can be used outside of App Engine with a security json file.

Installation

npm i @aicial/ghost-storage-google-cloud --save

Create storage module

As well as installing the NPM package, you will need to create a storage plugin within Ghost. From the root of your Ghost blog:

mkdir -p ./content/storage/gcs
echo -en \''use strict'\'';\nmodule.exports = require('\''@aicial/ghost-storage-google-cloud'\'');\n' > ./content/storage/gcs/index.js

If you don't want to do it that way - you need to end up with the content below in "content/storage/gcs/index.js"

'use strict';
module.exports = require('@aicial/ghost-storage-google-cloud');

Configuration

If you are using App Engine and have the default bucket created - you can use the minimal configuration below. If you are outside of App Engine or want more control over the configuration - build something from the second example.

Add storage block to file config.js in each environment as below (minimal):

storage: {
    active: 'gcs',
    'gcs': {}
},

If you want more control:

storage: {
    active: 'gcs',
    'gcs': {
      projectId: 'my-project-id',
      bucket: 'bucket-name.appspot.com',
      key: 'server-to-server-auth-key.json',
      customURL: 'https://mycustom.domain/'
    }
},

You can create a bucket via the Console - https://console.cloud.google.com/storage/browser

Credentials (the server-to-server key) are created here - https://console.cloud.google.com/apis/credentials

ghost-storage-google-cloud's People

Contributors

troykelly avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rimusz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.