Ghost 5.x ใช้งาน SQLite

Ghost 5.x ใช้งาน SQLite

Ghost 5.x จะทำการ default database เป็น MySQL ซึ่งสมัยก่อนโน้น default database คือ sqlite

BREAKING CHANGE: Switch from sqlite3 to MySQL by default by tianon · Pull Request #323 · docker-library/ghost
Fixes #310The intent is to merge this breaking change to coincide with the 5.9 upstream Ghost release so that we have a clean place to point users back to (#310 (comment)).Here’s a full diff of t…

แต่ถ้าเราอยากติดตั้ง ghost 5.x + sqlite ก็สามารถติดตั้งได้เหมือนกัน

Configuration - Adapt your publication to suit your needs
Find out how to configure your Ghost publication or override Ghost’s default behaviour with robust config options, including mail, storage, scheduling and more!
version: "3.8"
services:
  ghost:
    image: ghost:latest
    container_name: ghost
    restart: always
    ports:
      - "2368:2368"
    environment:
      url: http://localhost:2368
      database__client: sqlite3
      database__connection__filename: "content/data/ghost.db"
      database__useNullAsDefault: true
      database__debug: false
    volumes:
      - ~/ghost:/var/lib/ghost/content
docker-compose.yml

"~/ghost/content/data/ghost.db" จะเป็น path สำหรับเก็บข้อมูล sqlite กรณีเราอยากย้าย database ก็แค่ copy file ghost.db