My Ghost 6.0 has been running since I last posted here about it, but I’ve run into a wrinkle: you can’t update this in-place through ghost update.
So I’m looking at the Getting Started with Containers article to use Podman instead, specifically Option 3. I want to migrate the data in the old ghost config to the new one, and also make it easy to update the ghost image without losing data. Option 3 externalizes the MySQL database instance so it persists, and I’ve modified the example compose.yaml file to persist the ghost/content folder
EXAMPLE CONFIG
name: pod-ghost
services:
ghostpod:
image: ghost:latest
container_name: pod-ghost
network_mode: host
environment:
- url=https://mydomain.com
- NODE_ENV=production
- server__port=29487
- database__client=mysql
- database__connection__host=localhost
- database__connection__database=mydbname
- database__connection__user=mydbyser
- database__connection__password=mydbuserpw
volumes:
- ghostpod-content:/var/lib/ghost/content
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
volumes:
ghostpod-content:
driver_opts:
device: ./content
podman-compose config # to test