Skip to content

Commit f09bf5d

Browse files
committed
Use label explicitly for identifing container.
1 parent 088cd19 commit f09bf5d

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

mt/common.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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}

mt/mt-watcher.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
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);

0 commit comments

Comments
 (0)