MovableType 7の開発環境構築
公式のリポジトリに日本語ドキュメントがあるので、それを見てやればいいが、この手順はvagrantを使うようになっている。
LinuxではDockerを直接使えばいいので、この手順のvagrant mt-devをmakeに置き替えて進めるといい。
$ git clone https://github.com/movabletype/mt-dev.gitCloning ...$ cd mt-dev$ cp /path/to/MT7-Rxxxx.zip archiveデフォルトは192.168.58.25で実行される設定になっているが、Dockerを使う場合はlocalhostにする。これはmt-config.cgi-originalをmt-config.cgi-localにコピーして編集する。
--- mt-config.cgi-original 2022-03-05 22:43:24.890623836 +0900+++ mt-config.cgi-local 2022-03-05 23:21:34.944760358 +0900@@ -12,13 +12,13 @@ ################################################################
# The CGIPath is the URL to your Movable Type directory-CGIPath http://192.168.58.25/cgi-bin/mt/+CGIPath http://localhost/cgi-bin/mt/
# The StaticWebPath is the URL to your mt-static directory # Note: Check the installation documentation to find out # whether this is required for your environment. If it is not, # simply remove it or comment out the line by prepending a "#".-StaticWebPath http://192.168.58.25/mt-static+StaticWebPath http://localhost/mt-static
#================ DATABASE SETTINGS ================== # CHANGE setting below that refer to databasesオプションを与えてもいいが、何度も実行するのは面倒なので、ここで、.envを作る。
ARCHIVE=MT7-Rxxxx.zipREPO=https://github.com/movabletype/mt-plugin-shared-preview.gitMT_CONFIG_CGI=mt-config.cgi-localあとは、この状態でmakeすればいい。
make uphttp://localhost/cgi-bin/mt/mt.cgi を開くとアクセスできる。
使い終わったら
make down