40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
[supervisord]
|
|
nodaemon=true
|
|
# (Tùy chọn) Ngăn Supervisor tự tạo log file của chính nó
|
|
logfile=/dev/null
|
|
logfile_maxbytes=0
|
|
|
|
[program:nginx]
|
|
command=/usr/sbin/nginx -g "daemon off;"
|
|
autostart=true
|
|
autorestart=true
|
|
priority=10
|
|
# Chuyển hướng stdout của Nginx ra stdout của Supervisor
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
# Chuyển hướng stderr của Nginx ra stderr của Supervisor
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|
|
|
|
[program:php-fpm]
|
|
command=/usr/local/sbin/php-fpm --nodaemonize --fpm-config /usr/local/etc/php-fpm.conf
|
|
autostart=true
|
|
autorestart=true
|
|
priority=5
|
|
# Chuyển hướng stdout của PHP-FPM ra stdout của Supervisor
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
# Chuyển hướng stderr của PHP-FPM ra stderr của Supervisor
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|
|
|
|
[program:queue-work]
|
|
process_name=%(program_name)s_%(process_num)02d
|
|
command=php /var/www/html/artisan queue:work
|
|
user=www-data
|
|
autostart=true
|
|
autorestart=true
|
|
numprocs=1
|
|
redirect_stderr=true
|
|
stdout_logfile=/dev/stdout
|