Hello world

First ever blog post! Deploying Ghost with Docker Compose

Hello world
Photo by Mohammad Rahmani / Unsplash

This is my first ever blog post on my new site and I think it's going well. I have decided that for the first blog I would talk about deploying Ghost, the blog platform I am useing and some of my initial thoughts.

Deploying Ghost with Docker Compose

I am going to assume that you already know how to use Docker Compose and all ready have setup a domain, SSL certificates and what not. I my case I am runmning Docker Compose in an Ubuntu server with Nginx Proxy Manager a reverse proxy.

Docker Compose File

Simplicity first, I try to make everything I do as simple as possible because when it eventually breaks I am going to have to remember how it works to fix it.

version: '3.1'

services:
  ghost:
    image: ghost:4.44
    restart: always
    ports:
      - 2368:2368
    volumes:
      - ./blog/:/var/lib/ghost/content
    environment:
      # see https://ghost.org/docs/config/#configuration-options
      database__client: sqlite3
      database__connection__filename: "content/data/ghost.db"
      database__useNullAsDefault: "true"
      database__debug: "false"
      url: "https://blog.tephra.me"

With simplicity in mind I decided to go with sqlite3 for the database with the creatively named database file ghost.db. I also specified that Ghost shoud user the local folder ./blog to store all of it's data files, this makes backing up the blog extremely simple. Lastly I updated the url that I had already pre-configured.

Initial Setup

With the Ghost running it was time to set it up. I opened up my web browser and navigated to the site and I was surprised to see a default page talking about Ghost, I was expecting to see the configuration page much like you woud see in WordPress.

Ghost's Default Page

I after looking around on the default page trying to figure out how to get in the admin panel I eventually had to Google it, it's /ghost, unhelpfully. This default page woud be more helpful if it have some instructions or event just a link to the admin page.

Once I was in, I first set about disabling social media integration because I don't use social media. Next was to disable subscriptions, I don't want people to subscribe and I don't want users to sign up either. I this proved to be a little more difficult to do that it should have been, to disable the sign up/subscribe buttons you need to remove then by adding some custom css to the site.

<style type='text/css'>
    /* Hide the Membership/Subscribe subsystem */
    a.gh-head-button,
    #ghost-portal-root,
    .footer-cta,
    .gh-head-actions,
    .site-footer a[href^="https://ghost.org"] { display: none; }
    .gh-head-inner { grid-template-columns: auto auto; }
    .gh-head-brand { max-width: 400px; }
    .site-footer-nav ul, .gh-head-menu { justify-content: flex-end; }

    /* make serif Article font match sans-serif index page font */
    /* Set font-family on body if you want to tweak it. */
    article.post p {
        font-family: inherit;
    }
</style>

Overall Impression

Overall I am quite happy with Ghost, it's simple to use and much faster than WordPress. But where are a few things I don't like:

  • No spell check
  • No syntax highlighting by default
  • I can't figure out how to preview a post
  • I don't have as much fine grain control as I would like over posts

Regardless I think I'm going to continue to use Ghost but I will have to look into finding solutions for my above problems.