LoginSignup
13
6

More than 1 year has passed since last update.

Ghost使ってみた

Posted at

Ghost: Turn your audience into a business
※公式サイトはおしゃれすぎてOSSプロジェクトには見えません😂😂😂

ghost.org_(1280x720).png

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にアクセスします。

  • トップ画面
    localhost_8080_(1280x720).png

  • ブログ記事画面
    localhost_8080_coming-soon_(1280x720).png

おしゃれです!!!

アクセスしてみよう(管理者向けサイト)

管理者向け画面はhttp://localhost:8080/ghost/でアクセスします。(WordPressで言うところのwp-admin/です)

  • 初期設定
    localhost_8080_ghost_(1280x720).png

初期設定が終わると以下の項目が表示されます。

  • Write your first post
  • Customize your site
  • Import menbers
  • Explole Ghost admin

localhost_8080_ghost_(1280x720) (1).png

それぞれ見てみます。

  • Write your first post
    ブログを書く画面です。
    localhost_8080_ghost_(1280x720) (2).png

  • Customize your site
    設定画面
    localhost_8080_ghost_(1280x720) (3).png

  • Import menbers
    メンバー登録
    localhost_8080_ghost_(1280x720) (4).png

  • Explole Ghost admin
    管理者画面
    localhost_8080_ghost_(1280x720) (5).png

全体的にシンプルですね。

テーマを変えたりもできます。

localhost_8080_ghost_(1280x720) (8).png

特徴

  1. インテグレーション
    プラグインを足して機能拡張ができる仕組みです。Gmail、GitHub、Twitter、Stripeなどを始め、かなりの数のインテグレーションが用意されています。
    ghost.org_integrations_(1280x720).png

  2. マーケットプレイス
    テーマやインテグレーションが色々公開されています。有料のものもあるようです。
    ghost.org_marketplace_(1280x720).png

  3. headless CMS
    APIベースのアーキテクチャを採用しているので、headless化ができるようです。
    ghost.org_docs_architecture_(1280x720) (1).png
    出典:https://ghost.org/docs/architecture/
    image.png
    出典:https://ghost.org/docs/jamstack/

まとめ

Ghost使ってみました。

Googleトレンドで流行ってるか見てみたのですが、Ghostが一般的な言葉なので、いまいちわかりませんでした。

trends.google.co.jp_trends_explore_cat=13&q=wordpress,ghost(1280x720).png

DockerHubのダウンロード数はWordPressが1B+に対して100M+でした。(Official Imageで100M+だったものはkibanacassandraなどがありました。)人気なのはやはりWordPressのようです。

13
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
6