我尝试使用 Procfile 启动进程但没有成功。我在 Elastic Beanstalk 中使用 Amazon Linux 2 和 PHP 平台。 这是我尝试调试的测试 Procfile:
web: bash -c "while true ; do date ; sleep 1 ; done"
control: python3 controlHub/controlCenter/control.py
bashtest: bash -c "while true ; do date ; sleep 1 ; done"
phptest: php -r 'while (true) { echo date("Y-m-d h:i:s") . "\n"; sleep(1); }'
部署工作正常,Wordpress 网站运行正常。我可以在 /etc/rsyslog.d/web.conf 中看到创建了日志重定向。但是,/var/logs 中没有这些 Procfile 进程的日志文件,并且 systemctl status 显示这些进程没有运行。