如何通过 AWS EC2 重启让 uwsgi 容器重启

问题描述 投票:0回答:1

我的 CentOS EC2 实例上安装了 nginx 和 uwsgi。

当我从 AWS 控制面板重启机器时,Nginx 成功重启。

Uwsgi 没有。

我必须登录并使用“sudo /etc/init.d/uwsgi start”重新启动它,然后一切都很好。然后我当然可以注销,因为它作为服务运行。

必须登录才能完成重启过程显然不是最佳选择。

但我认为我已经正确完成了配置。

当我执行 chkconfig 时,我看到:

uwsgi           0:off   1:off   2:on    3:on    4:on    5:on    6:off

如果我查看 /etc/init.d/uwsgi 中的文件,文件顶部显示:

#!/bin/bash
# uwsgi - Use uwsgi to run python and wsgi web apps.
#
# chkconfig: 2345 85 15
# description: Use uwsgi to run python and wsgi web apps.
# processname: uwsgi
amazon-ec2 centos uwsgi
1个回答
0
投票

使用Supervisor来控制uwsgi通常是推荐的解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.