- Docker 23.0.4+ / Docker Compose 2.17.2+
- Apache 2.4(ubuntu:18.04) + PSGI(ubuntu:22.04) + MySQL
git clone https://github.com/hsur/docker-movabletype-psgi.git
cd docker-movabletype-psgi
cp .env.example .env
docker compose build
以下のコマンドを実行することでMTOS-5.2.13とmt-config.cgiを自動的に設置できます。
bash mtsetup.sh
docker-movabletype-psgi/
└ src/
├ mt/ Movable Type 本体ディレクトリ
└ html/ webroot
└ mt-static/ シンボリックリンク or コピー
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
- http://localhost:8000/mt/mt.cgi
- 「最初のウェブサイトを作成」画面
- ウェブサイトURL : http://localhost:8000/
- ウェブサイトパス : /var/www/html
- 「最初のウェブサイトを作成」画面
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
docker compose restart mt
WEB_PORT=8000 # ウェブサーバの外向けのポート( http://localhost:8000/ )
APP_PORT=5000 # アプリケーションサーバのポート
DOC_ROOT=/var/www/html # ドキュメントルートのコンテナ内部パス(デフォルトでは ./src が /var/www になっている)
WORK_DIR=/var/www/mt # MTインストールディレクトリのコンテナ内部パス