Skip to content

Commit c45c1ca

Browse files
authored
Merge pull request #142 from eexit/fix-dockerfile-example
Fix Docker build + build support for Ghost 5
2 parents d6885ea + 388e791 commit c45c1ca

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
[![Test Coverage](https://api.codeclimate.com/v1/badges/f55e8c82a9a526fe9b2f/test_coverage)](https://codeclimate.com/github/eexit/ghost-storage-cloudinary/test_coverage)
77
[![Known Vulnerabilities](https://snyk.io/test/github/eexit/ghost-storage-cloudinary/badge.svg)](https://snyk.io/test/github/eexit/ghost-storage-cloudinary)
88

9-
10-
119
A fully featured and deeply tested [Cloudinary](https://cloudinary.com/) [Ghost](https://github.com/TryGhost/Ghost) storage adapter.
1210

1311
### Features
@@ -22,14 +20,14 @@ A fully featured and deeply tested [Cloudinary](https://cloudinary.com/) [Ghost]
2220

2321
## Installation
2422

25-
### Install from Yarn
23+
### Install using yarn
2624

2725
- Go into Ghost root directory
2826
- Download the adapter:
2927

3028
```bash
31-
$ yarn add ghost-storage-cloudinary
32-
$ mv node_modules/ghost-storage-cloudinary content/adapters/storage/ghost-storage-cloudinary
29+
yarn add ghost-storage-cloudinary
30+
mv node_modules/ghost-storage-cloudinary content/adapters/storage/ghost-storage-cloudinary
3331
```
3432

3533
- Done, go configure
@@ -39,13 +37,14 @@ $ mv node_modules/ghost-storage-cloudinary content/adapters/storage/ghost-storag
3937
Here's an example of using this adapter with a containerized Ghost:
4038

4139
```Dockerfile
42-
FROM ghost:4-alpine as cloudinary
40+
FROM ghost:5-alpine as cloudinary
4341
WORKDIR $GHOST_INSTALL/current
42+
RUN apk add g++ make python3
4443
RUN su-exec node yarn add ghost-storage-cloudinary
4544

46-
FROM ghost:4-alpine
47-
COPY --chown=node:node --from=cloudinary $GHOST_INSTALL/current/node_modules $GHOST_INSTALL/current/node_modules
48-
COPY --chown=node:node --from=cloudinary $GHOST_INSTALL/current/node_modules/ghost-storage-cloudinary $GHOST_INSTALL/current/content/adapters/storage/ghost-storage-cloudinary
45+
FROM ghost:5-alpine
46+
COPY --chown=node:node --from=cloudinary $GHOST_INSTALL/current/node_modules $GHOST_INSTALL/node_modules
47+
COPY --chown=node:node --from=cloudinary $GHOST_INSTALL/current/node_modules/ghost-storage-cloudinary $GHOST_INSTALL/content/adapters/storage/ghost-storage-cloudinary
4948
RUN set -ex; \
5049
su-exec node ghost config storage.active ghost-storage-cloudinary; \
5150
su-exec node ghost config storage.ghost-storage-cloudinary.upload.use_filename true; \
@@ -71,14 +70,13 @@ Check out [configuration.json.dist](configuration.json.dist) for a complete exam
7170

7271
- `upload.use_filename = true` in order use the original image name
7372
- `upload.unique_filename = false` unlikely Ghost local storage adapter which auto-dedup an existing file name, Cloudinary will return the existing image URL instead of deduping the image
74-
- `upload.overwrite = false ` goes along with previous option: returns existing image instead of overwriting it
73+
- `upload.overwrite = false` goes along with previous option: returns existing image instead of overwriting it
7574
- `upload.folder = "my-blog"` allows to upload all your images into a specific directory instead of Cloudinary media library root
7675
- `upload.tags = ["blog", "photography"]` if you want to add some taxonomy to your uploaded images
7776
- `fetch.quality = "auto"` equals `auto:good` (see [doc](https://cloudinary.com/documentation/image_transformation_reference#quality_parameter))
7877
- `fetch.secure = false` set to true if you want to serve images over SSL (not recommended for performances)
7978
- `fetch.cdn_subdomain = true` to really use the benefit of Cloudinary CDN
8079

81-
8280
:heart: Don't forget to checkout the [plugins](plugins)!
8381

8482
## Development
@@ -87,11 +85,11 @@ Run `yarn install` without the `--production` flag.
8785

8886
Runs the tests and generate coverage:
8987

90-
$ yarn coverage
88+
yarn coverage
9189

9290
Runs the linter:
9391

94-
$ yarn eslint
92+
yarn eslint
9593

9694
To enable debug logs, set the following environment variable:
9795

0 commit comments

Comments
 (0)