Skip to content

Commit

Permalink
Ensure all proceses stop if a supervisor child stops
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed Jun 22, 2024
1 parent 6f43f53 commit 508497b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion common/config/supervisor/conf.d/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:nginx]
command=nginx -g 'daemon off;'
command=sh -c "nginx -g 'daemon off;' || kill -s SIGQUIT $PPID"

stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
Expand All @@ -8,3 +8,4 @@ stderr_logfile_maxbytes=0

autorestart=false
startretries=0
stopasgroup=true
3 changes: 2 additions & 1 deletion matomo/config/supervisor/conf.d/php-fpm.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:php-fpm]
command=php-fpm -F
command=sh -c "php-fpm -F || kill -s SIGQUIT $PPID"

stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
Expand All @@ -8,3 +8,4 @@ stderr_logfile_maxbytes=0

autorestart=false
startretries=0
stopasgroup=true
3 changes: 2 additions & 1 deletion nuxt-base/config/supervisor/conf.d/nuxt.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[program:nuxt]
command=sh -c "node ./server/index.mjs || kill -s SIGQUIT $PPID"
directory=/app/www
command=node ./server/index.mjs

stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
Expand All @@ -9,3 +9,4 @@ stderr_logfile_maxbytes=0

autorestart=false
startretries=0
stopasgroup=true
3 changes: 2 additions & 1 deletion php-base/config/supervisor/conf.d/php-fpm.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:php-fpm]
command=php-fpm -F
command=sh -c "php-fpm -F || kill -s SIGQUIT $PPID"

stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
Expand All @@ -8,6 +8,7 @@ stderr_logfile_maxbytes=0

autorestart=false
startretries=0
stopasgroup=true

; Let app know it's NOT running via octane
environment=LARAVEL_OCTANE="0"
3 changes: 2 additions & 1 deletion php-base/config/supervisor/conf.d/php-octane.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:php-octane]
command=php /app/www/artisan octane:start --server=swoole --host=0.0.0.0 --port=3000 --workers=1 --task-workers=0
command=sh -c "php /app/www/artisan octane:start --server=swoole --host=0.0.0.0 --port=3000 --workers=1 --task-workers=0 || kill -s SIGQUIT $PPID"

stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
Expand All @@ -8,6 +8,7 @@ stderr_logfile_maxbytes=0

autorestart=false
startretries=0
stopasgroup=true

; Let app know it's running via octane
environment=LARAVEL_OCTANE="1"

0 comments on commit 508497b

Please sign in to comment.