49 Ghost
Ghost is “a fully open source, hackable platform for building and running a modern online publication.”
49.1 Ingredients
Docker swarm clusterpersistent shared storage
Traefik
keepalived
49.2 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
Setup Docker Swarm
Create a docker swarm config file in docker-compose syntax (v3), something like this:
with my patreon patronspremixgit pulldocker stack deployversion: '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.frontend.rule=Host:ghost.example.com
- traefik.docker.network=traefik
- traefik.port=2368
networks:
traefik_public:
external: true
49.3 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/
49.4 Chef’s Notes
- If I wasn’t committed to a static-site-generated blog, Ghost is the platform I’d use for my blog.
- A default using the SQlite database takes 548k of space:
[root@ds1 ghost]# du -sh /var/data/ghost/
548K /var/data/ghost/
[root@ds1 ghost]#
hero: Gitlab - A recipe for a self-hosted GitHub alternative