Currently, my blog is running Ghost CLI + Ghost Storage Cloudinary, it is working smoothly with my workflow.
After I learnt about deploy on Docker, it really something I want on my server for my website. Thanks Ghost official built-in a lot of GUI features for import and export the content and members, it’ s really easy for someone like me to do it without any deployment experience it can be easily deploy in Docker-compose.yml below.
version: '3.1'
services:
ghost:
image: ghost:4-alpine
restart: always
ports:
- 8080:2368
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: example
database__connection__database: ghost
# this url value is just an example, and is likely wrong for your environment!
url: http://localhost:8080
# contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
#NODE_ENV: development
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
However, I have totally have no idea what should I do for Ghost Storage Cloudinary
plugin, Install on Docker section, does it mean that I have to do it in ghost container directory after I deployed Ghost container?
FROM ghost:5-alpine as cloudinary
RUN apk add g++ make python3
RUN su-exec node yarn add ghost-storage-cloudinary
FROM ghost:5-alpine
COPY --chown=node:node --from=cloudinary $GHOST_INSTALL/node_modules $GHOST_INSTALL/node_modules
COPY --chown=node:node --from=cloudinary $GHOST_INSTALL/node_modules/ghost-storage-cloudinary $GHOST_INSTALL/content/adapters/storage/ghost-storage-cloudinary
# Here, we use the Ghost CLI to set some pre-defined values.
RUN set -ex; \
su-exec node ghost config storage.active ghost-storage-cloudinary; \
su-exec node ghost config storage.ghost-storage-cloudinary.upload.use_filename true; \
su-exec node ghost config storage.ghost-storage-cloudinary.upload.unique_filename false; \
su-exec node ghost config storage.ghost-storage-cloudinary.upload.overwrite false; \
su-exec node ghost config storage.ghost-storage-cloudinary.fetch.quality auto; \
su-exec node ghost config storage.ghost-storage-cloudinary.fetch.cdn_subdomain true;