I know 0.10 brought a braking change for the s3 storage https://github.com/TryGhost/Ghost/wiki/Using-a-custom-storage-module
I now use this plug-in https://github.com/kelyvin/ghost-s3-service
> docker logs --follow $ctnID
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info prestart [email protected]
npm info start [email protected]
> [email protected] start /usr/src/ghost
> node index
ERROR: Your storage adapter does not inherit from the Storage Base.
Error
at Error.IncorrectUsage (/usr/src/ghost/core/server/errors/incorrect-usage.js:3:18)
at Object.getStorage (/usr/src/ghost/core/server/storage/index.js:54:15)
at setupMiddleware (/usr/src/ghost/core/server/middleware/index.js:126:44)
at /usr/src/ghost/core/server/index.js:188:9
at tryCatcher (/usr/src/ghost/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:691:18)
at Promise._fulfill (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:636:18)
at PromiseArray._resolve (/usr/src/ghost/node_modules/bluebird/js/release/promise_array.js:125:19)
at PromiseArray._promiseFulfilled (/usr/src/ghost/node_modules/bluebird/js/release/promise_array.js:143:14)
at Promise._settlePromise (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:572:26)
at Promise._settlePromise0 (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:691:18)
at Async._drainQueue (/usr/src/ghost/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/usr/src/ghost/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/src/ghost/node_modules/bluebird/js/release/async.js:17:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
npm info poststart [email protected]
npm info ok
root@01:~/deploy-setup#
Here is the logs when I install the module
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info addNameTag [ 'ghost-s3-service', 'latest' ]
npm info attempt registry request try #1 at 4:08:26 AM
npm http request GET https://registry.npmjs.org/ghost-s3-service
npm http 200 https://registry.npmjs.org/ghost-s3-service
npm info retry fetch attempt 1 at 4:08:26 AM
npm info attempt registry request try #1 at 4:08:26 AM
npm http fetch GET https://registry.npmjs.org/ghost-s3-service/-/ghost-s3-service-1.0.2.tgz
npm http fetch 200 https://registry.npmjs.org/ghost-s3-service/-/ghost-s3-service-1.0.2.tgz
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3
npm info installOne [email protected]
npm info preinstall [email protected]
npm info attempt registry request try #1 at 4:08:27 AM
npm http request GET https://registry.npmjs.org/aws-sdk
npm info attempt registry request try #1 at 4:08:27 AM
npm http request GET https://registry.npmjs.org/aws-sdk-promise
npm info attempt registry request try #1 at 4:08:27 AM
npm http request GET https://registry.npmjs.org/bluebird
npm http 200 https://registry.npmjs.org/aws-sdk
npm info retry fetch attempt 1 at 4:08:27 AM
npm info attempt registry request try #1 at 4:08:27 AM
npm http fetch GET https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.6.6.tgz
npm http 200 https://registry.npmjs.org/bluebird
npm http fetch 200 https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.6.6.tgz
npm http 200 https://registry.npmjs.org/aws-sdk-promise
npm WARN deprecated [email protected]: stop using this library. use a recent aws-sdk library instead. note that you will need to stop looking at the .data property of return values
npm info retry fetch attempt 1 at 4:08:27 AM
npm info attempt registry request try #1 at 4:08:27 AM
npm http fetch GET https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz
npm info retry fetch attempt 1 at 4:08:27 AM
npm info attempt registry request try #1 at 4:08:27 AM
npm http fetch GET https://registry.npmjs.org/aws-sdk-promise/-/aws-sdk-promise-0.0.2.tgz
npm http fetch 200 https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz
npm http fetch 200 https://registry.npmjs.org/aws-sdk-promise/-/aws-sdk-promise-0.0.2.tgz
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service
npm info installOne [email protected]
npm info installOne [email protected]
npm info installOne [email protected]
npm info preinstall [email protected]
npm info attempt registry request try #1 at 4:08:28 AM
npm http request GET https://registry.npmjs.org/promise
npm http 200 https://registry.npmjs.org/promise
npm info retry fetch attempt 1 at 4:08:28 AM
npm info attempt registry request try #1 at 4:08:28 AM
npm http fetch GET https://registry.npmjs.org/promise/-/promise-6.1.0.tgz
npm http fetch 200 https://registry.npmjs.org/promise/-/promise-6.1.0.tgz
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise
npm info installOne [email protected]
npm info preinstall [email protected]
npm info attempt registry request try #1 at 4:08:29 AM
npm http request GET https://registry.npmjs.org/asap
npm http 200 https://registry.npmjs.org/asap
npm info retry fetch attempt 1 at 4:08:29 AM
npm info attempt registry request try #1 at 4:08:29 AM
npm http fetch GET https://registry.npmjs.org/asap/-/asap-1.0.0.tgz
npm http fetch 200 https://registry.npmjs.org/asap/-/asap-1.0.0.tgz
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise/node_modules/promise
npm info installOne [email protected]
npm info preinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise/node_modules/promise/node_modules/asap
npm info preinstall [email protected]
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise/node_modules/promise
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/bluebird
npm info linkStuff [email protected]
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info preinstall [email protected]
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/jmespath
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/querystring
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/sax
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/url
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/xml2js
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/xmlbuilder
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/buffer
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/crypto-browserify
npm http 200 https://registry.npmjs.org/jmespath
npm http 200 https://registry.npmjs.org/querystring
npm http 200 https://registry.npmjs.org/sax
npm http 200 https://registry.npmjs.org/url
npm http 200 https://registry.npmjs.org/xmlbuilder
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz
npm http 200 https://registry.npmjs.org/crypto-browserify
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz
npm http 200 https://registry.npmjs.org/xml2js
npm http fetch 200 https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz
npm http 200 https://registry.npmjs.org/buffer
npm http fetch 200 https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/sax/-/sax-1.1.5.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/url/-/url-0.10.3.tgz
npm http fetch 200 https://registry.npmjs.org/sax/-/sax-1.1.5.tgz
npm http fetch 200 https://registry.npmjs.org/url/-/url-0.10.3.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.6.2.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz
npm http fetch 200 https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.6.2.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/xml2js/-/xml2js-0.4.15.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz
npm http fetch 200 https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz
npm http fetch 200 https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz
npm http fetch 200 https://registry.npmjs.org/xml2js/-/xml2js-0.4.15.tgz
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info installOne [email protected]
npm info installOne [email protected]
npm info installOne [email protected]
npm info installOne [email protected]
npm info installOne [email protected]
npm info installOne [email protected]
npm info installOne [email protected]
npm info installOne [email protected]
npm info preinstall [email protected]
npm info preinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/sax
npm info preinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/xml2js
npm info linkStuff [email protected]
npm info install [email protected]
npm info linkStuff [email protected]
npm info postinstall [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info attempt registry request try #1 at 4:08:34 AM
npm http request GET https://registry.npmjs.org/punycode
npm http 200 https://registry.npmjs.org/punycode
npm info retry fetch attempt 1 at 4:08:34 AM
npm info attempt registry request try #1 at 4:08:34 AM
npm http fetch GET https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz
npm info preinstall [email protected]
npm http fetch 200 https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/querystring
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/url
npm info installOne [email protected]
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info preinstall [email protected]
npm info attempt registry request try #1 at 4:08:34 AM
npm http request GET https://registry.npmjs.org/lodash
npm info preinstall [email protected]
npm http 200 https://registry.npmjs.org/lodash
npm info retry fetch attempt 1 at 4:08:34 AM
npm info attempt registry request try #1 at 4:08:34 AM
npm http fetch GET https://registry.npmjs.org/lodash/-/lodash-3.5.0.tgz
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/url/node_modules/punycode
npm http fetch 200 https://registry.npmjs.org/lodash/-/lodash-3.5.0.tgz
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/url
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/xmlbuilder
npm info installOne [email protected]
npm info preinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/jmespath
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info preinstall [email protected]
npm info attempt registry request try #1 at 4:08:35 AM
npm http request GET https://registry.npmjs.org/isarray
npm info attempt registry request try #1 at 4:08:35 AM
npm http request GET https://registry.npmjs.org/base64-js
npm info attempt registry request try #1 at 4:08:35 AM
npm http request GET https://registry.npmjs.org/ieee754
npm http 200 https://registry.npmjs.org/isarray
npm http 200 https://registry.npmjs.org/ieee754
npm http 200 https://registry.npmjs.org/base64-js
npm info retry fetch attempt 1 at 4:08:35 AM
npm info attempt registry request try #1 at 4:08:35 AM
npm http fetch GET https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz
npm info retry fetch attempt 1 at 4:08:35 AM
npm info attempt registry request try #1 at 4:08:35 AM
npm http fetch GET https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz
npm info retry fetch attempt 1 at 4:08:35 AM
npm info attempt registry request try #1 at 4:08:35 AM
npm http fetch GET https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz
npm http fetch 200 https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz
npm http fetch 200 https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz
npm http fetch 200 https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer
npm info install [email protected] into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer
npm info installOne [email protected]
npm info installOne [email protected]
npm info installOne [email protected]
npm info preinstall [email protected]
npm info preinstall [email protected]
npm info preinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer/node_modules/ieee754
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer/node_modules/isarray
npm info linkStuff [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer/node_modules/base64-js
npm info install [email protected]
npm info linkStuff [email protected]
npm info postinstall [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info preinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/crypto-browserify
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info preinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/xmlbuilder/node_modules/lodash
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/xmlbuilder
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
[email protected] node_modules/ghost-s3-service
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
npm info ok
---> 611a7944cf16
Here in my config.js
storage: {
active: 'ghost-s3',
'ghost-s3': {
accessKeyId: process.env.S3_ACCESS_KEY_ID,
secretAccessKey: process.env.S3_ACCESS_SECRET_KEY,
bucket: process.env.S3_BUCKET_NAME,
region: process.env.S3_BUCKET_REGION,
assetHost: process.env.S3_ASSET_HOST_URL
}
},
Hi @pascalandy, I see you already raised this over here: https://github.com/kelyvin/ghost-s3-service/issues/1
I'd suggest it's a problem with either the module or how it's been installed. Ghost enforces restrictions to make sure the module you have is valid and will work once installed. Your current setup is failing that restriction. As it's not a bug, I'm going to close this. If you're looking for help getting it installed, please use the #help channel on slack.
Please note: we're working hard on solidifying the API and processes around adapters ready for Ghost 1.0, the current system is LTS, so if it needs a bug fix, it will be done, but we won't be making improvements.
Make sense. Thank you!
@pascalandy do you have solution? I am running against the same problem :(
I am using the ghost-s3-storage-adapter
Sorry I give up.
I tried reeeaaly hard but at the end, I decided to mount the images folder to a storage object.
No more issues since.
@pascalandy Sorry to hear that and glad you found a way to fix it.
@marc101101 was able to fix this issue.
The problem is the following: If you have Ghost installed as sub dependency (ls -la node_modules/ghost), then the s3 adapter requires the base adapter from there. If not, it requires it from the project root.
https://github.com/kelyvin/ghost-s3-service/blob/master/index.js#L13
You need to ensure that the require path is the correct one.
If using Ghost as NPM module, it needs to be the path to the sub dependency.
If not, it needs to be the path to the project root.
We are using instanceof and this can fail, if the required file is a different one then we compare to.
We will work on getting rid of the dirty requires asap by outsourcing the base adapters into npm modules.
Thanks for the explanation @kirrg001
It will be great!
We will work on getting rid of the dirty requires asap by outsourcing the base adapters into npm modules.
@kirrg001 Ran into the same exact error but I'm not that familiar with npm and those dependencies. Could you please elaborate exactly the way you managed to fix this issue?
Thanks a lot!
Hey @oligafner Sorry to hear that.
Did you read and try my comment https://github.com/TryGhost/Ghost/issues/7487#issuecomment-275205866?
If you still need help, can you please swing by our slack channel and ask in the #help channel?
@kirrg001 figured it out! Thanks for your help!