yeszao / dnmp

Docker LNMP (Nginx, PHP7/PHP5, MySQL, Redis)
https://www.awaimai.com/2120.html
MIT License
3.96k stars 1.42k forks source link

docker 镜像安装 supervisor supervisorctl 的命令都无效 #364

Closed taobali32 closed 3 years ago

taobali32 commented 3 years ago

容器内查看

image

我的配置

[program:hyperf]
command=php ./bin/hyperf.php start
directory=/www/work/roa/api
priority=999                ; the relative start priority (default 999)
autostart=true              ; start at supervisord start (default: true)
autorestart=true            ; retstart at unexpected quit (default: true)
startsecs=5                 ; number of secs prog must stay running (def. 10)
startretries=3              ; max # of serial start failures (default 3)
exitcodes=0,2               ; 'expected' exit codes for process (default 0,2)
stopsignal=QUIT             ; signal used to kill process (default TERM)
stopwaitsecs=10             ; max num secs to wait before SIGKILL (default 10)
user=root                 ; setuid to this UNIX account to run the program
log_stdout=true
log_stderr=true             ; if true, log program stderr (def false)
logfile=/tmp/php.log
logfile_maxbytes=1MB        ; max # logfile bytes b4 rotation (default 50MB)
logfile_backups=10          ; # of logfile backups (default 10)
stdout_logfile_maxbytes=20MB  ; stdout 日志文件大小,默认 50MB
stdout_logfile_backups=20     ; stdout 日志文件备份数
stdout_logfile=/tmp/php.stdout.log
process_name=%(program_name)s_%(process_num)02d
numprocs=8

不知道为什么,容器都是可以运行的

taobali32 commented 3 years ago

不用了,直接容器启动的时候执行命令启动hyperf,