- Little bit story

Ghost was a simple blog CMS, it was really suit you who feel Wordpress was too overkill or tired of their elementor…

- How To

I just want to share ghost based blog setup on docker swarm. Some notes what I have at the worker side:

  1. I used glusterfs as NFS so each worker node can share same folder & file.
  2. Using gmail as main email.
  3. Using latest ghost image.
  4. Using casper themes. If you need to modify this theme, just reupload themes, then that themes was located at themes/casper-1. Why you need to reupload casper theme? because default ghost theme was located outside /var/lib/ghost/content.

Copy this config as jurig.yml

version: '3.3'

services:
  jurig:
    image: ghost
    networks:
      - traefik-public
    environment:
      - NODE_ENV=production
      - url=https:/jurig.com
      - mail__transport="SMTP"
      - mail__from="Jurig Blog <jurig.ghost@gmail.com>"
      - mail__options__service="gmail"
      - mail__options__host="smtp.gmail.com"
      - mail__options__port="465"
      - mail__options__secure="true"
      - mail__options__auth__user="jurig.ghost@gmail.com"
      - mail__options__auth__pass="jurig123"
    volumes:
      - type: bind
        source: /mnt/persistentdisk/
        target: /var/lib/ghost/content
    deploy:
      labels:
        - traefik.enable=true
        - traefik.docker.network=traefik-public
        - traefik.constraint-label=traefik-public
        - traefik.http.routers.jurig-http.rule=Host(`jurig.com`)
        - traefik.http.routers.jurig-http.entrypoints=http
        - traefik.http.routers.jurig-http.middlewares=https-redirect
        - traefik.http.routers.jurig-https.rule=Host(`jurig.com`)
        - traefik.http.routers.jurig-https.entrypoints=https
        - traefik.http.routers.jurig-https.tls=true
        - traefik.http.routers.jurig-https.tls.certresolver=le
        - traefik.http.services.jurig.loadbalancer.server.port=2368

networks:
  traefik-public:
    external: true

volumes:
  jurig-data:
    external: true

Run docker stack deploy -c jurig.yml jurig

Log Ghost Swarm Mode

Log Ghost Swarm Mode