Ghost Platform with Docker, SSL and Cloud Storage
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Ghost Platform with Docker, SSL and Cloud Storage

Docker Automated build Docker Build Status Docker Stars Docker Pulls

The goal was to set up Ghost on a Docker host machine with a Cloud asset storage (AWS or DigitalOcean) and enable HTTPS using Let’s Encrypt for certificate generation and auto-renewal.

This recipe can either be used via docker-compose or docker stack deploy (on Swarm enabled Docker hosts), i created a GitHub Repository with docker-compose files and some useful scripts.

It combines three Docker images:

  • valian/docker-nginx-auto-ssl: i found this to be a good solution to enable SSL, basically it's a nginx proxy that can be configured via env variables for multi-domain certificate generation and renewal
  • mysql:5.7: really nothing to say here, it's just our Ghost database
  • macchie/ghost-scs: that's the image you will build using the Dockerfile, an hosted version is also available on DockerHub so you don't actually need to build your own unless you need further customization

In addition you can use a custom driver for your Ghost content volume, i used local-persist, its just a normal docker volume but you can specify it's path on the disk and the data won't get deleted if you destroy the volume. To install local-persist driver on your system just run this command and uncomment the volumes driver options in your compose file:

curl -fsSL | sudo bash

In conclusion, spin up your configuration with:

docker-compose up --build

on you development machine, or deploy a stack on a Docker Swarm by running:

docker stack deploy -c docker-compose.production.yml MYSTACKNAME

Additional informations and resources you may want to check in case of problems:

Enjoy your new Ghost Blog :)