1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 17:56:26 +00:00
Files
geek-cookbook/docs/recipes/ghost.md
David Young f22dd8eb50 Add authentik, tidy up recipe-footer
Signed-off-by: David Young <davidy@funkypenguin.co.nz>
2023-10-31 14:37:29 +13:00

1.7 KiB

title, description, recipe
title description recipe
Blog with Ghost in Docker How to run the beautiful, publication-focused blogging engine "Ghost" using Docker Ghost

Ghost

Ghost is "a fully open source, hackable platform for building and running a modern online publication."

Ghost screenshot{ loading=lazy }

{{ page.meta.recipe }} Requirements

--8<-- "recipe-standard-ingredients.md"

Preparation

Setup data locations

Create the location for the bind-mount of the application data, so that it's persistent:

mkdir -p /var/data/ghost

{{ page.meta.recipe }} Docker Swarm config

Create a docker swarm config file in docker-compose syntax (v3), something like the example below:

--8<-- "premix-cta.md"

version: '3'

services:
  ghost:
    image: ghost:1-alpine
    volumes:
     - /etc/localtime:/etc/localtime:ro
     - /var/data/ghost/:/var/lib/ghost/content
    networks:
    - traefik_public
    deploy:
      labels:
        # traefik common
        - traefik.enable=true
        - traefik.docker.network=traefik_public

        # traefikv1
        - traefik.frontend.rule=Host:ghost.example.com
        - traefik.port=2368     

        # traefikv2
        - "traefik.http.routers.ghost.rule=Host(`ghost.example.com`)"
        - "traefik.http.services.ghost.loadbalancer.server.port=2368"
        - "traefik.enable=true"

networks:
  traefik_public:
    external: true

Serving

Launch Ghost stack

Launch the Ghost stack by running docker stack deploy ghost -c <path -to-docker-compose.yml>

Create your first administrative account at https://YOUR-FQDN/admin/

{% include 'recipe-footer.md' %}