File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
1111* Enable to start service via.
1212 * e.g. DOCKER\_ MT\_ SERVICES=postfix
13+ * Support docker-compose 2.x
1314
1415### Fixed
1516
Original file line number Diff line number Diff line change @@ -3,3 +3,6 @@ services:
33 mt :
44 restart : always
55 command : " /usr/sbin/httpd -D FOREGROUND"
6+
7+ mt-watcher :
8+ command : " /bin/true"
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ services:
1717 - " support:/var/www/cgi-bin/mt/mt-static/support"
1818 # override entrypoint
1919 - " ./docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh"
20+ labels :
21+ mt-dev.service : " mt"
2022
2123 httpd :
2224 image : ${DOCKER_HTTPD_IMAGE:-movabletype/test:php-7.3}
@@ -38,7 +40,16 @@ services:
3840 command : apache2-foreground
3941
4042 mt-watcher :
41- image : busybox
43+ build :
44+ context : mt-watcher
45+ working_dir : /var/www/cgi-bin/mt
46+ environment :
47+ PERL_FNS_NO_OPT : ${PERL_FNS_NO_OPT:-0}
48+ DISABLE_MT_WATCHER : ${DISABLE_MT_WATCHER:-0}
49+ volumes :
50+ - " ${MT_HOME_PATH:-../../movabletype}:/var/www/cgi-bin/mt"
51+ - " ./mt-watcher.pl:/usr/local/lib/mt/bin/mt-watcher.pl"
52+ - /var/run/docker.sock:/var/run/docker.sock
4253
4354volumes :
4455 site :
Original file line number Diff line number Diff line change 3131 return unless @paths ;
3232
3333 print ( join ( " \n " , @paths ) . " \n " );
34- system (' docker kill -s HUP mt_mt_1' );
34+ my $mt_container_id = ` docker ps -q --filter label=mt-dev.service=mt` ;
35+ system (" docker kill -s HUP $mt_container_id " );
3536
3637 # throttling
3738 sleep (1);
Original file line number Diff line number Diff line change @@ -7,16 +7,6 @@ services:
77 MT_PID_FILE_PATH : ${MT_PID_FILE_PATH:-/tmp/mt.psgi.pid}
88 volumes :
99 - " ./plackup-mt:/usr/local/lib/mt/bin/plackup-mt"
10+
1011 mt-watcher :
11- build :
12- context : mt-watcher
13- image : movabletype/mt-watcher
14- working_dir : /var/www/cgi-bin/mt
1512 command : /usr/local/lib/mt/bin/mt-watcher.pl
16- environment :
17- PERL_FNS_NO_OPT : ${PERL_FNS_NO_OPT:-0}
18- DISABLE_MT_WATCHER : ${DISABLE_MT_WATCHER:-0}
19- volumes :
20- - " ${MT_HOME_PATH:-../../movabletype}:/var/www/cgi-bin/mt"
21- - " ./mt-watcher.pl:/usr/local/lib/mt/bin/mt-watcher.pl"
22- - /var/run/docker.sock:/var/run/docker.sock
You can’t perform that action at this time.
0 commit comments