mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-31 19:27:09 +01:00
Improve supervisor configuration
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Early Entry"
|
||||
|
||||
cleanup ()
|
||||
{
|
||||
kill -s SIGTERM $!
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGINT SIGTERM
|
||||
|
||||
while :
|
||||
do
|
||||
sleep 60 ; cd /var/www/app/ && php artisan schedule:run;
|
||||
done
|
||||
8
config/shutdown.sh
Normal file
8
config/shutdown.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
printf "READY\n";
|
||||
|
||||
while read line; do
|
||||
echo "Processing Event: $line" >&2;
|
||||
kill -SIGQUIT $PPID
|
||||
done < /dev/stdin
|
||||
@@ -1,5 +1,4 @@
|
||||
[supervisord]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
nodaemon=true
|
||||
user=invoiceninja
|
||||
pidfile=/var/run/supervisord/supervisord.pid
|
||||
@@ -8,7 +7,6 @@ logfile_maxbytes=0
|
||||
loglevel=error
|
||||
|
||||
[program:php-fpm]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
autostart=true
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
@@ -19,7 +17,6 @@ stderr_logfile_maxbytes=0
|
||||
command=php-fpm
|
||||
|
||||
[program:scheduler]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
autostart=true
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
@@ -39,4 +36,12 @@ stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
numprocs=2
|
||||
command=php artisan queue:work --sleep=3 --tries=1 --memory=256 --timeout=3600 --daemon
|
||||
command=php artisan queue:work redis --sleep=3 --tries=3 --memory=256
|
||||
|
||||
[eventlistener:shutdown]
|
||||
command=/shutdown.sh
|
||||
events=PROCESS_STATE_STOPPED, PROCESS_STATE_EXITED, PROCESS_STATE_FATAL
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
Reference in New Issue
Block a user