Ghost: Turn your audience into a business
※公式サイトはおしゃれすぎてOSSプロジェクトには見えません😂😂😂
Ghostとは(英語版Wikipediaより)
Ghost is a free and open source blogging platform written in JavaScript and distributed under the MIT License, designed to simplify the process of online publishing for individual bloggers as well as online publications.
日本語訳
Ghostは、JavaScriptで書かれ、MITライセンスの下で配布されている、フリーでオープンソースのブログプラットフォームで、個人ブロガーやオンライン出版物のためのオンライン出版のプロセスを簡素化するために設計されています。
WordPressっぽいやつみたいでして、公式サイトでも比較が出ています。
Dockerで簡単に試すことができましたので、記録を残します。
環境構築
Docker Hubにオフィシャルイメージがありますのでこれを使います。ご丁寧にdocker-compose.yamlも用意されています。
version: '3.1'
services:
ghost:
image: ghost:4-alpine
restart: always
ports:
- 8080:2368
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: example
database__connection__database: ghost
# this url value is just an example, and is likely wrong for your environment!
url: http://localhost:8080
# contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
#NODE_ENV: development
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
docker-composeで一発起動
docker-compose up
ログを眺めていると、MySQLの初期化が完了するまではGhostの起動が失敗しますが、何度もリトライして、そのうちうまく起動します。
ghost_1 | [2022-05-07 10:20:28] INFO Ghost URL Service Ready in 21.428s
ghost_1 | [2022-05-07 10:20:28] INFO Ghost booted in 21.499s
ghost_1 | [2022-05-07 10:20:28] INFO Adding offloaded job to the queue
ghost_1 | [2022-05-07 10:20:28] INFO Scheduling job update-check at 36 3 6 * * *. Next run on: Sun May 08 2022 06:03:36 GMT+0000 (Coordinated Universal Time)
Ghost booted
のログがでれば起動完了です。
アクセスしてみよう(一般向けサイト)
ブラウザでhttp://localhost:8080
にアクセスします。
おしゃれです!!!
アクセスしてみよう(管理者向けサイト)
管理者向け画面はhttp://localhost:8080/ghost/
でアクセスします。(WordPressで言うところのwp-admin/
です)
初期設定が終わると以下の項目が表示されます。
- Write your first post
- Customize your site
- Import menbers
- Explole Ghost admin
それぞれ見てみます。
全体的にシンプルですね。
テーマを変えたりもできます。
特徴
-
インテグレーション
プラグインを足して機能拡張ができる仕組みです。Gmail、GitHub、Twitter、Stripeなどを始め、かなりの数のインテグレーションが用意されています。
-
headless CMS
APIベースのアーキテクチャを採用しているので、headless化ができるようです。
出典:https://ghost.org/docs/architecture/
出典:https://ghost.org/docs/jamstack/
まとめ
Ghost使ってみました。
Googleトレンドで流行ってるか見てみたのですが、Ghostが一般的な言葉なので、いまいちわかりませんでした。
DockerHubのダウンロード数はWordPressが1B+
に対して100M+
でした。(Official Imageで100M+だったものはkibana
やcassandra
などがありました。)人気なのはやはりWordPressのようです。