https://github.com/dzimchuk/ghost-azure-blob-storage
Azure Blob Storage adapter for Ghost 1.x
https://github.com/dzimchuk/ghost-azure-blob-storage
Last synced: about 1 month ago
JSON representation
Azure Blob Storage adapter for Ghost 1.x
- Host: GitHub
- URL: https://github.com/dzimchuk/ghost-azure-blob-storage
- Owner: dzimchuk
- License: mit
- Created: 2016-11-09T18:56:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-30T11:13:47.000Z (over 7 years ago)
- Last Synced: 2025-03-29T03:06:10.283Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure Blob Storage adapter for [Ghost](https://github.com/TryGhost/Ghost) 1.x
## Installation
### Windows
```
cd /your/ghost/directorymkdir .\content\adapters\storage\azure-blob-storage
cd .\content\adapters\storage\azure-blob-storage
npm install ghost-azure-blob-storage --production
xcopy .\node_modules\ghost-azure-blob-storage\*.* . /E /Y
```### Linux
```
cd /var/www/ghostmkdir -p ./content/adapters/storage/azure-blob-storage
cd ./content/adapters/storage/azure-blob-storage
npm install ghost-azure-blob-storage --production
cp -favr node_modules/ghost-azure-blob-storage/* .
```## Configuration
In your config.{env}.json file, you'll need to add a new `storage` block:
```
"storage": {
"active": "azure-blob-storage",
"azure-blob-storage": {
"connectionString": "your storage account connection string",
"container": "container name, lowercase, 3-63 characters, only letters, numbers or dashes (-), default is 'ghost'",
"cdnUrl": "your CDN endpoint (optional), e.g. https://{endpoint}.azureedge.net"
}
}
```### CDN
If you use CDN you need to make sure that it points to the container and not to the storage account base URL as the adapter will omit the container name when constructing the resulting image URL.
Storage image URL:
```
https://{account}.blob.core.windows.net/{container}/2017/08/image.jpg
```CDN image URL:
```
https://{endpoint}.azureedge.net/2017/08/image.jpg
```### Environment variables
The following environment variables can be used to provide values for the above settings:
- storage_connectionString
- storage_container
- storage_cdnUrlEnvironment variables take precedence over config.{env}.json values and defaults.
## License
[MIT](./LICENSE)