Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

Added support for specifying the cpanfile to be referenced at startup with DOCKER_MT_CPANFILES.
The default value is t/cpanfile.

## [2.0.0] - 2022-02-21

### Added
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export DOCKER_COMPOSE_YAML_MIDDLEWARES:=-f ./mt/mysql.yml -f ./mt/memcached.yml
export UP_ARGS:=-d
export MT_HOME_PATH:=${MAKEFILE_DIR}/../movabletype
export UPDATE_BRANCH:=yes
export DOCKER_MT_CPANFILES:=t/cpanfile

MT_CONFIG_CGI=${shell [ -e mt-config.cgi ] && echo mt-config.cgi || echo mt-config.cgi-original}
BASE_ARCHIVE_PATH=${MAKEFILE_DIR}/archive
Expand All @@ -30,6 +31,7 @@ export DOCKER_MT_BUILD_CONTEXT
export DOCKER_MT_DOCKERFILE
export DOCKER_MT_IMAGE
export DOCKER_MT_SERVICES
export DOCKER_MT_CPANFILES
export DOCKER_NODEJS_IMAGE
export DOCKER_HTTPD_BUILD_CONTEXT
export DOCKER_HTTPD_DOCKERFILE
Expand Down
1 change: 1 addition & 0 deletions mt/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
NLS_LANG: ${NLS_LANG:-Japanese_Japan.UTF8}
MT_DEV_UPDATE_BRANCH: ${UPDATE_BRANCH:-yes}
DOCKER_MT_SERVICES: ${DOCKER_MT_SERVICES}
DOCKER_MT_CPANFILES: ${DOCKER_MT_CPANFILES}
APACHE_LOG_DIR: ${APACHE_LOG_DIR:-/tmp/apache2/log}
APACHE_PID_FILE: ${APACHE_PID_FILE:-/tmp/apache2/run/apache2.pid}
volumes:
Expand Down
18 changes: 14 additions & 4 deletions mt/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
#!/bin/sh

[ "$(id -u)" -eq 0 ] && SUDO= || SUDO=sudo

if [ -n "$DOCKER_MT_SERVICES" ]; then
for s in $DOCKER_MT_SERVICES; do
service $s start
$SUDO service $s start
done
fi

if [ -n "$DOCKER_MT_CPANFILES" ]; then
for f in $DOCKER_MT_CPANFILES; do
if [ -f $f ]; then
$SUDO cpm install -g --cpanfile=$f
fi
done
fi

chmod 777 /var/www/html
chmod 777 /var/www/cgi-bin/mt/mt-static/support
chmod 777 /var/www/cgi-bin/mt/themes
$SUDO chmod 777 /var/www/html
$SUDO chmod 777 /var/www/cgi-bin/mt/mt-static/support
$SUDO chmod 777 /var/www/cgi-bin/mt/themes

if [ "$1" = "apache2-foreground" ]; then
# invoke php-fpm
Expand Down