Skip to content

Commit 099fcc0

Browse files
committed
Added support for specifying the cpanfile to be referenced at startup with DOCKER_MT_CPANFILES.
1 parent b9c6380 commit 099fcc0

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Added
10+
11+
Added support for specifying the cpanfile to be referenced at startup with DOCKER_MT_CPANFILES.
12+
The default value is t/cpanfile.
13+
914
## [2.0.0] - 2022-02-21
1015

1116
### Added

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export DOCKER_COMPOSE_YAML_MIDDLEWARES:=-f ./mt/mysql.yml -f ./mt/memcached.yml
77
export UP_ARGS:=-d
88
export MT_HOME_PATH:=${MAKEFILE_DIR}/../movabletype
99
export UPDATE_BRANCH:=yes
10+
export DOCKER_MT_CPANFILES:=t/cpanfile
1011

1112
MT_CONFIG_CGI=${shell [ -e mt-config.cgi ] && echo mt-config.cgi || echo mt-config.cgi-original}
1213
BASE_ARCHIVE_PATH=${MAKEFILE_DIR}/archive
@@ -30,6 +31,7 @@ export DOCKER_MT_BUILD_CONTEXT
3031
export DOCKER_MT_DOCKERFILE
3132
export DOCKER_MT_IMAGE
3233
export DOCKER_MT_SERVICES
34+
export DOCKER_MT_CPANFILES
3335
export DOCKER_NODEJS_IMAGE
3436
export DOCKER_HTTPD_BUILD_CONTEXT
3537
export DOCKER_HTTPD_DOCKERFILE

mt/common.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ services:
1414
NLS_LANG: ${NLS_LANG:-Japanese_Japan.UTF8}
1515
MT_DEV_UPDATE_BRANCH: ${UPDATE_BRANCH:-yes}
1616
DOCKER_MT_SERVICES: ${DOCKER_MT_SERVICES}
17+
DOCKER_MT_CPANFILES: ${DOCKER_MT_CPANFILES}
1718
APACHE_LOG_DIR: ${APACHE_LOG_DIR:-/tmp/apache2/log}
1819
APACHE_PID_FILE: ${APACHE_PID_FILE:-/tmp/apache2/run/apache2.pid}
1920
volumes:

mt/docker-entrypoint.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ if [ -n "$DOCKER_MT_SERVICES" ]; then
66
done
77
fi
88

9+
if [ -n "$DOCKER_MT_CPANFILES" ]; then
10+
for f in $DOCKER_MT_CPANFILES; do
11+
if [ -f $f ]; then
12+
cpm install -g --cpanfile=$f
13+
fi
14+
done
15+
fi
16+
917
chmod 777 /var/www/html
1018
chmod 777 /var/www/cgi-bin/mt/mt-static/support
1119
chmod 777 /var/www/cgi-bin/mt/themes

0 commit comments

Comments
 (0)