supervisor管理docusaurus
supervisor配置文件 /etc/supervisor/supervisord.conf
中定义了include,因此如果想要管理服务,就需要编辑 /etc/supervisor/config.d/*.ini
文件
[include]
files = /etc/supervisor/config.d/*.ini
说明
docusaurus 是facebook开源的网站构建工具
编辑docusaurus服务配置文件 /etc/supervisor/config.d/docusaurus.ini
cat > /etc/supervisor/config.d/php72.ini <<'EOF'
[program:docusaurus]
command=yarn run start
directory=/docusaurus
environment=PATH=/root/.nvm/versions/node/v16.17.0/bin:%(ENV_PATH)s
user=root
stdout_logfile=/var/log/supervisor/docusaurus.log
redirect_stderr=true
autostart=true
autorestart=true
EOF
说明
将docusaurus加入supervisor
$ supervisorctl update docusaurus
docusaurus: added process group
查看状态
$ supervisorctl status docusaurus
docusaurus RUNNING pid 11037, uptime 0:00:16