eexit / ghost-storage-cloudinary

:rocket: A fully-featured and deeply tested Cloudinary Ghost storage adapter

Home Page:https://ghost.org/integrations/cloudinary/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to integrate with existing docker-compose?

mikestecker opened this issue · comments

How can I integrate into an existing project? I'm currently running Ghost using the following docker-compose.yml:

version: '3.1'
services:
  ghost:
    image: arm64v8/ghost
    restart: unless-stopped
    environment:
      url: http://localhost:3001
    volumes:
      - ./ghost-data:/var/lib/ghost/content
    ports:
      - 3001:2368

I've tried creating a new Dockerfile based on your example on the readme, and then modifying docker-compose.yml to the following:

FROM arm64v8/ghost as cloudinary
WORKDIR $GHOST_INSTALL/current
RUN su-exec node yarn add ghost-storage-cloudinary@2

FROM arm64v8/ghost
COPY --chown=node:node --from=cloudinary $GHOST_INSTALL/current/node_modules $GHOST_INSTALL/current/node_modules
COPY --chown=node:node --from=cloudinary $GHOST_INSTALL/current/node_modules/ghost-storage-cloudinary $GHOST_INSTALL/current/core/server/adapters/storage/ghost-storage-cloudinary
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;
version: '3.1'
services:
  ghost:
    build:
      context: ./
      dockerfile: Dockerfile
    image: ghost
    restart: unless-stopped
    environment:
      url: http://localhost:3001
    volumes:
      - ./ghost-data:/var/lib/ghost/content
    ports:
      - 3001:2368

However, this causes a generic error with NextJS and GraphQL: Error: Index creation failed.

Any ideas? I'm using the latest version of Ghost (v4).

Hello @mikestecker,

Thanks for reaching out. I haven't tested yet with the v4 of Ghost. I will eventually upgrade my own blogs soon and I will fix the issue if there's one.
Without a more detailed error, I can't really help and tell you if the issue is coming from the storage adapter or not.

Please do share some trace/logs and I'll see how can I help.
Thanks!