It's not, it is not 2018. Anyway, with that out of the way let's move onto a mini installment of the 'wasting my time continuously re-implementing a blog' extravaganza.

This one's very simple Caddy + Docker + Ghost = now that's a tasty equation. Let's get down to business. {
        proxy / localhost:2368

Unlike the contrived example in my last post, this is literally the entire config needed to serve a Ghost blog over HTTPS on a custom domain. If you've ever tried installing (and maintaining) ghost manually you'll know that it's a bit of a pain, just look at the 'how to upgrade' section on the site and you'll be greeted by a spaghetti mess of wget, curl, chown and a million other bash commands.

In comes Docker, if you've been trapped in a container for the last few years then you might have missed the point. "Packaging software into units for development, shipment and deployment."

One oh so tasty docker image is ghost official, a container that manages all of ghost's dependencies without us lifting a finger.

docker run --name blog 2368:2368 -d ghost
docker stop blog
docker start blog

# run -> run process in container
# name -> name to give to the process
# 2368:2368 -> map host port 2368 to container port 2368
# -d -> run container in 'detatched' or background mode
# ghost -> the name of the image on the docker hub

The first time we run docker run --name blog 2368:2368 -d ghost we download the latest ghost image from docker hub, then create and run our container.

All we need to do from now on is docker kill blog to stop the container from running and docker start blog to start the container running again.

That's it, pack up boys we're going home. Oh yes, a brief note on updating --

image of labs menu in ghost

In your Ghost admin panel, click on labs then export (or import) to backup and restore all of your posts (keep em' somewhere safe).

Then -- docker rm blog and go back to the start of this tutorial, finally reimporting your backed up data. Assuming that the Ghost docker image is maintained, you can get up to date easily.

This assumes you have both Caddy and Docker already installed, if you don't --

# ----- installing caddy -----

# install caddy into your path
curl | bash

# ----- installing docker -----

# get the GPG key for docker
sudo apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

# add the docker repo to apt
sudo apt-add-repository 'deb ubuntu-xenial main'

# update package listings
sudo apt-get update

# install docker
sudo apt-get install -y docker-engine

and there we have it, Ghost server over HTTPS without having to install anything except Caddy and Docker. If you feel like a fun stretch project, have a go at using the Caddy docker container maintained by one of the core Caddy contributors.