ghos3
ghos3 copied to clipboard
DigitalOcean Spaces Installation (+ Problem with installation)
Hi there! Thanks for forking the original adapter and maintaining it.
I have a Ghost blog on DigitalOcean and wanted to connect it with its Spaces for storage. After some tinkering I finally adapted the installation instructions and wanted to share it for anyone (myself included) in the future. If you're interested in adding it to the README file, I can make a quick PR for that.
Here's what worked for me:
{
"storage": {
"active": "s3",
"media": {
"adapter": "s3"
},
"files": {
"adapter": "s3"
},
"s3": {
"accessKeyId": "...",
"secretAccessKey": "...",
"region": "<REGION_NAME like fra1>",
"bucket": "<BUCKET_NAME>",
"assetHost": "<CDN_ENDPOINT>",
"pathPrefix": "<ANYTHING_YOU_LIKE>",
"endpoint": "https://<REGION>.digitaloceanspaces.com"
}
}
}
Not sure if the region
param is required though, so I added it for the sake of explicitness. One tricky part is that the endpoint
param has to have the bucket name omited, as it is added automatically from the bucket
param. I did not check if it would work by adding the bucket name straight into the endpoint
URL and just removing the bucket
param from the config.
Also, when I tried to install the adapter into the /content/adapters/storage/s3
as instructed, it wouldn't get picked up by Ghost on startup. It worked, hovewer, when I installed it into /current/core/server/adapters/storage/s3
—not sure why.
Node: v18.19.0
Ghost-CLI: 1.25.3
Ghost: 5.76.0 (at /var/www/ghost)