virtualen中未找到Gunicorn

2024-05-14 06:13:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在部署一个django应用程序,当我手动运行它时,它可以正常工作。我尝试使用supervisor,但当我运行sudo supervisorctl status botApp时,日志文件显示:

Starting botApp as ubuntu
/home/ubuntu/gunicorn_start.bash: line 28: exec: gunicorn: not found

我的古尼科恩_开始.bash是以下一个:

^{pr2}$

和我的配置文件在/etc/supervisor/conf.d中/botApp.conf是:

[program:botApp]
command = /home/ubuntu/gunicorn_start.bash;
user = ubuntu;
stdout_logfile = /home/ubuntu/logs/gunicorn_supervisor.log;
redirect_stderr = true;
environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8;

我的古尼科恩聚会出什么事了吗?非常感谢


Tags: djangobash应用程序homeubuntuconf部署手动
1条回答
网友
1楼 · 发布于 2024-05-14 06:13:39

检查虚拟环境是否处于活动状态。只要写一个简单的脚本

#!bin/bash

source /var/www/html/project_env/bin/activate

然后运行命令 ->;sudo bash文件_姓名.sh在

如果你没有得到任何错误,那意味着venv被激活了

注意-终端或外壳上不会有任何venv激活标记。在

相关问题 更多 >