Skip to content

Commit

Permalink
Format supervisord.conf (INI) files manually
Browse files Browse the repository at this point in the history
※ INI file doesn't have standardization(?) and any formatter
  • Loading branch information
zuka-e committed Nov 29, 2023
1 parent 1983435 commit 4568ade
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 45 deletions.
64 changes: 32 additions & 32 deletions backend/docker/app/supervisor/supervisord.dev.conf
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
; http://supervisord.org/configuration.html

[supervisord]
nodaemon=true
user=%(ENV_USER)s
logfile=%(ENV_WORK_DIR)s/storage/logs/supervisord.log
pidfile=/tmp/supervisord.pid
nodaemon = true
user = %(ENV_USER)s
logfile = %(ENV_WORK_DIR)s/storage/logs/supervisord.log
pidfile = /tmp/supervisord.pid

; As seen in the PHP Docker image, `php-fpm` (`CMD`) will be run
; by being read by `ENTRYPOINT` (`.../bin/docker-php-entrypoint`) as its arg.
; Since my `Dockerfile` adds `ENTRYPOINT` and overrides the default, run `php-fpm` here.
[program:php-fpm]
command=php-fpm
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=%(ENV_USER)s
redirect_stderr=true
stdout_logfile=%(ENV_WORK_DIR)s/storage/logs/php-fpm.log
stopwaitsecs=3600
command = php-fpm
autostart = true
autorestart = true
stopasgroup = true
killasgroup = true
user = %(ENV_USER)s
redirect_stderr = true
stdout_logfile = %(ENV_WORK_DIR)s/storage/logs/php-fpm.log
stopwaitsecs = 3600

; cf. https://laravel.com/docs/10.x/queues#supervisor-configuration
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
numprocs=8
process_name = %(program_name)s_%(process_num)02d
numprocs = 8
; > during your deployment process, be sure to restart your queue workers.
; > https://laravel.com/docs/10.x/queues#the-queue-work-command
; > a process manager such as Supervisor to automatically restart the queue workers.
Expand All @@ -32,23 +32,23 @@ numprocs=8
; In short, restart is required after updated, but not with Supervisor with `max-time`.
; cf. https://laravel.com/docs/10.x/queues#processing-jobs-for-a-given-number-of-seconds
; (After changing `max-time`, Docker rebuild is required)
command=php %(ENV_WORK_DIR)s/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=%(ENV_USER)s
redirect_stderr=true
stdout_logfile=%(ENV_WORK_DIR)s/storage/logs/worker.log
stopwaitsecs=3600
command = php %(ENV_WORK_DIR)s/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart = true
autorestart = true
stopasgroup = true
killasgroup = true
user = %(ENV_USER)s
redirect_stderr = true
stdout_logfile = %(ENV_WORK_DIR)s/storage/logs/worker.log
stopwaitsecs = 3600

; cf. https://laravel.com/docs/10.x/horizon#supervisor-configuration
[program:horizon]
process_name=%(program_name)s
command=php %(ENV_WORK_DIR)s/artisan horizon
autostart=true
autorestart=true
user=%(ENV_USER)s
redirect_stderr=true
stdout_logfile=%(ENV_WORK_DIR)s/storage/logs/horizon.log
stopwaitsecs=3600
process_name = %(program_name)s
command = php %(ENV_WORK_DIR)s/artisan horizon
autostart = true
autorestart = true
user = %(ENV_USER)s
redirect_stderr = true
stdout_logfile = %(ENV_WORK_DIR)s/storage/logs/horizon.log
stopwaitsecs = 3600
26 changes: 13 additions & 13 deletions backend/docker/app/supervisor/supervisord.prod.conf
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
; http://supervisord.org/configuration.html

[supervisord]
nodaemon=true
user=%(ENV_USER)s
logfile=%(ENV_WORK_DIR)s/storage/logs/supervisord.log
pidfile=/tmp/supervisord.pid
nodaemon = true
user = %(ENV_USER)s
logfile = %(ENV_WORK_DIR)s/storage/logs/supervisord.log
pidfile = /tmp/supervisord.pid

; As seen in the PHP Docker image, `php-fpm` (`CMD`) will be run
; by being read by `ENTRYPOINT` (`.../bin/docker-php-entrypoint`) as its arg.
; Since my `Dockerfile` adds `ENTRYPOINT` and overrides the default, run `php-fpm` here.
[program:php-fpm]
command=php-fpm
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=%(ENV_USER)s
redirect_stderr=true
stdout_logfile=%(ENV_WORK_DIR)s/storage/logs/php-fpm.log
stopwaitsecs=3600
command = php-fpm
autostart = true
autorestart = true
stopasgroup = true
killasgroup = true
user = %(ENV_USER)s
redirect_stderr = true
stdout_logfile = %(ENV_WORK_DIR)s/storage/logs/php-fpm.log
stopwaitsecs = 3600

0 comments on commit 4568ade

Please sign in to comment.