docker-library / ghost

Docker Official Image packaging for Ghost
https://hub.docker.com/_/ghost
MIT License
738 stars 313 forks source link

Create environment variable for API KEY and sync content from ghost remote #424

Open jsulopzs opened 2 months ago

jsulopzs commented 2 months ago

It'd be great to have an environment variable GHOST_API_KEY that enables access to remote Ghost content from the domain:

version: "3.1"

services:
  ghost:
    image: ghost:alpine
    ports:
      - "3001:2368"
    volumes:
      # Mount only the specific directories you need
      - ./ghost-content:/var/lib/ghost/content
    environment:
      NODE_ENV: development
      database__connection__filename: /var/lib/ghost/content/data/ghost.db
      url: https://website.ghost.io
      GHOST_API_KEY: ?
tianon commented 2 months ago

As far as I know, API keys in Ghost are something the Ghost platform itself generates, not something that can be configured, right?

(Admittedly not something I'm terribly familiar with; doing my best with what I can find on https://ghost.org/docs/content-api/ :smile:)

tianon commented 2 months ago

To put that another way, I believe this being externally-configurable instead of simply internally-generated is probably a feature request/wishlist item for the upstream Ghost project itself. :innocent: