Self Host Ghost

A docker-compose yml file for setting up a default installation of Ghost.

Self Host Ghost

Install docker and docker-compose on the host of your choice, and run the following docker-compose.yml file.

Ghost should be hosted on http://localhost:2368

version: '3.3'

services:

  ghost:
    image: ghost:latest
    restart: always
    ports:
      - 2368:2368
    environment:
      database__client: mysql
      database__connection__host: db
      database__connection__user: ghost
      database__connection__password: ghostdbpass
      database__connection__database: ghostdb
      url: http://localhost:2368
      TZ: "Australia/Sydney"
    depends_on:
      - db
    volumes:
      - /opt/ghost/app:/var/lib/ghost/content

  db:
    image: mysql:8.0
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: ghost
      MYSQL_USER: ghost
      MYSQL_PASSWORD: ghostdbpass
      MYSQL_DATABASE: ghostdb
      TZ: "Australia/Sydney"
    volumes:
      - /opt/ghost/mysql:/var/lib/mysql