/docker-movabletype-psgi

Docker Compose で始める Movable Type 開発環境

Primary LanguageApacheConf

Movable Type 開発環境

動作環境

  • Docker 1.13.0+ / Docker Compose 1.10.0+

立ち上がる環境

  • Apache 2.4 + PSGI + MySQL

使い方

git clone 〜 docker-compose build

git clone git@github.com:apricoton/docker-movabletype-psgi.git
cd docker-movabletype-psgi
cp .env.example .env
docker-compose build

Movable Type を下記のように設置

docker-movabletype-psgi/
└ src/
    ├ mt/ Movable Type 本体ディレクトリ
    └ html/ webroot
         └ mt-static/ シンボリックリンク or コピー

mt-config.cgi

CGIPath        http://localhost:8000/mt/
StaticWebPath  /mt-static/
StaticFilePath /var/www/html/mt-static
BaseSitePath   /var/www/html

ObjectDriver DBI::mysql
Database movabletype
DBUser movabletype
DBPassword movabletype
DBHost db

DefaultLanguage ja

PIDFilePath /var/run/mt.pid

実行

docker-compose up -d

管理画面にアクセス

Tips

toolsのスクリプトを実行する

docker-compose exec --user docker mt /var/www/mt/tools/upgrade --name Melody
docker-compose exec --user docker mt /var/www/mt/tools/run-periodic-tasks

MTの再起動

docker-compose restart mt

.env

WEB_PORT=8000          # ウェブサーバの外向けのポート( http://localhost:8000/ )
APP_PORT=5000          # アプリケーションサーバのポート
DOC_ROOT=/var/www/html # ドキュメントルートのコンテナ内部パス(デフォルトでは ./src が /var/www になっている)
WORK_DIR=/var/www/mt   # MTインストールディレクトリのコンテナ内部パス