From 54e6d66c8375f46b46550ea22b67c351cb3d7438 Mon Sep 17 00:00:00 2001 From: Dearmadman Date: Fri, 30 Mar 2018 14:30:49 +0800 Subject: [PATCH] [feature] support for php worker hot load --- docker-compose.yml | 2 ++ php-worker/supervisord.conf | 9 ++------- php-worker/supervisord.d/laravel-worker.conf | 7 +++++++ 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 php-worker/supervisord.d/laravel-worker.conf diff --git a/docker-compose.yml b/docker-compose.yml index b46c350..49ee20d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -123,6 +123,8 @@ services: - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} volumes_from: - applications + volumes: + - ./php-worker/supervisord.d:/etc/supervisord.d depends_on: - workspace extra_hosts: diff --git a/php-worker/supervisord.conf b/php-worker/supervisord.conf index d0a2ece..203f014 100644 --- a/php-worker/supervisord.conf +++ b/php-worker/supervisord.conf @@ -6,10 +6,5 @@ port = 127.0.0.1:9001 [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface -[program:laravel-worker] -process_name=%(program_name)s_%(process_num)02d -command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon -autostart=true -autorestart=true -numprocs=8 -redirect_stderr=true +[include] +files = supervisord.d/*.conf \ No newline at end of file diff --git a/php-worker/supervisord.d/laravel-worker.conf b/php-worker/supervisord.d/laravel-worker.conf new file mode 100644 index 0000000..cce9e92 --- /dev/null +++ b/php-worker/supervisord.d/laravel-worker.conf @@ -0,0 +1,7 @@ +[program:laravel-worker] +process_name=%(program_name)s_%(process_num)02d +command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon +autostart=true +autorestart=true +numprocs=8 +redirect_stderr=true \ No newline at end of file