django - 找不到 gunicorn.socket 的工作
问题描述
我正在尝试在 digitalocean 上为我的 django 网站设置 gunicorn 但是
sudo systemctl start gunicorn.socket
响应为“gunicorn.socket 的作业失败”。我已经仔细检查了任何拼写错误或目录路径问题。
文件路径 = /etc/systemd/system/gunicorn.service
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=myuser
Group=www-data
WorkingDirectory=/home/myuser/profile_website
ExecStart=/home/myuser/profile_website/myenv/bin/gunicorn \
--access-logfile - \
--workers 3 \
--bind unix:/run/gunicorn.sock \
project2.wsgi:application
[Install]
WantedBy=multi-user.target
文件路径 = /etc/systemd/system/gunicorn.socket
[Unit]
Description=gunicorn socket
[Socket]
ListenStream=/run/gunicorn.sock
[Install]
WantedBy=sockets.target
我已经尝试重新启动 gunicorn.socket 但它不起作用。
解决方案
推荐阅读
- android - 在为我的 Android 应用创建定价页面时,如何根据国家/地区设置价格?
- python - 请告诉我如何将这个特定于按钮的 kivy 语言脚本转换为仍然使用 kivy 的纯 python
- php - 如何从导入的 Excel 中批量附加数组数据的关系?拉拉维尔,PHP
- nginx - 如何配置nginx缓存
- android-jetpack - Jetpack 组合动画 animateFloatAsState 具有可变参数值,如 Valueanimator
- github - Github 操作:在单个工作流中为多个分支创建发布
- python - 有没有办法在 CSV 中重新分配列表变量?
- javascript - Objection.js 中的附加连接条件
- powershell - 在 VS Code 中运行程序时如何删除 powershell 横幅?
- docker - 从另一个容器中的 flink 作业写入 docker 容器中的 kafka 主题