Skip to content

Ghost

Ghost is an open-source content platform for publishing blogs, newsletters, and membership sites. Use this component when you want Diploi to manage builds and deployments for a Ghost site. It keeps your content workflow together with the infrastructure that serves it.

Paste this entry into the components list in diploi.yaml to add Ghost to your project.

components:
- name: Ghost
identifier: ghost
package: https://github.com/diploi/component-ghost#v6.36.0

Ghost stores its content in MariaDB. When you pick Ghost in the Stack Builder, the MariaDB add-on and the environment variable mapping below are added to your project automatically. If you add Ghost to an existing project by editing diploi.yaml yourself, add them too:

components:
- name: Ghost
identifier: ghost
package: https://github.com/diploi/component-ghost#v6.36.0
env:
include:
- mariadb.MARIADB_HOST:database__connection__host
- mariadb.MARIADB_USER:database__connection__user
- mariadb.MARIADB_PASSWORD:database__connection__password
addons:
- name: MariaDB
identifier: mariadb
package: https://github.com/diploi/addon-mariadb#v1.0.0-url

The mapping is needed because Ghost reads its database settings from database__connection__* variables.

What Ghost defines in a deployment.

Ghost sets these values in every deployment. Other components can import them with env.include as ghost.*. Defaults marked generated are unique to each deployment.

Other variables

Set by the package. Override them on the deployment’s Environment tab or in diploi.yaml.

Variable Default
database__client mysql
database__connection__database ghost
storage__active DiploiImagesStorage
storage__media__adapter DiploiMediaStorage
storage__files__adapter DiploiFilesStorage

Start with a free trial, no account required https://diploi.com/component/ghost

Run Ghost on Diploi.

Uses the official ghost Docker image.

Includes custom storage adapters for Diploi. These save images, files and media to a storage volume that will persist between reboots. This volume can be found at /data on the Ghost app container.

  1. Sign up for Diploi at https://console.diploi.com/ using your GitHub account.
  2. In your dashboard, click Create Project +
  3. Under Pick Components, choose Ghost
    If you want to expand your Ghost blog with other tools, like a backend framework to add an API, in this section, you can add them. They will all be hosted on a single server, reducing costs and complexity.
  4. In Pick Add-ons, select any databases or tools you want to include.
  5. In Repository, choose Create Repository which will generate a new GitHub repo for you.
  6. Click Launch Stack

Check the full guide https://diploi.com/blog/hosting_a_ghost_blog

When running a development environment, Ghost will be run in development mode too. This will allow you to develop custom themes and plugins with ease.

To learn more about developing on Ghost, see the Developing Themes section of their docs.

The production image will be an optimized, minimal version with your custom code baked in. Depending on which features you have been working on, you might have to apply them in the Ghost Admin panel (like themes and plugins).